basecamelectronics / sbgc32-serial-api

A complete C-library and example projects for the SimpleBGC32 Serial API integration. Serial API allows to communicate with all gimbal controllers developed by Basecamelectronics company.
Apache License 2.0
24 stars 12 forks source link

RX_TIMEOUT_ERROR while stopping DataStream #2

Open poett1 opened 1 year ago

poett1 commented 1 year ago

Hello,

sbgc32-serial-api always returns RX_TIMEOUT_ERROR after stopping a requested DataStream using SBGC32_RequestDataStream(), regardless of the rxTimeout value (I increased it to 100*SBGC_RX_WAITING for testing). This can be reproduced using the following Patch to examples/Linux/DemoLaunch/main.c main.patch Apply the patch by running patch -u main.c < main.patch.

Output of the code is:

Board Info: Receive OK!

******************************
The system is ready to go!
Board Version: 3.6 
Firmware Version: 2.70b6 
******************************

CMD_CONFIRM #244
CMD_CONFIRM #90
Starting Data Stream
CMD_CONFIRM #85
Stopping Data Stream
CONFIRM_TIMEOUT_ERROR!
Data Stream Interval Stop error 

The SBGC starts and stops the stream as expected, the API simply does not get the confirmation. Command and answer are transmitted: image Answer of the SBGC: image

Any hints on this?

Also, I'm wondering why RealTimeDataCustom_t does not support all the data from RealTimeData_t (Realtime Data 4). This would be really helpful to limit the amount of data that is transmitted to only the information that is needed by the application.

Thanks a lot!

qsivey commented 1 year ago

Hello,

sbgc32-serial-api always returns RX_TIMEOUT_ERROR after stopping a requested DataStream using SBGC32_RequestDataStream(), regardless of the rxTimeout value (I increased it to 100*SBGC_RX_WAITING for testing). This can be reproduced using the following Patch to examples/Linux/DemoLaunch/main.c main.patch Apply the patch by running patch -u main.c < main.patch.

Output of the code is:

Board Info: Receive OK!

******************************
The system is ready to go!
Board Version: 3.6 
Firmware Version: 2.70b6 
******************************

CMD_CONFIRM #244
CMD_CONFIRM #90
Starting Data Stream
CMD_CONFIRM #85
Stopping Data Stream
CONFIRM_TIMEOUT_ERROR!
Data Stream Interval Stop error 

The SBGC starts and stops the stream as expected, the API simply does not get the confirmation. Command and answer are transmitted: image Answer of the SBGC: image

Any hints on this?

Also, I'm wondering why RealTimeDataCustom_t does not support all the data from RealTimeData_t (Realtime Data 4). This would be really helpful to limit the amount of data that is transmitted to only the information that is needed by the application.

Thanks a lot!

Hello!

How do you realise Stopping Data Stream function? Now it is missed in the library.

Very soon we are planning to update the library to 1.0 version, where will that function be. Thanks for the feedback!

poett1 commented 1 year ago

By sending the same cmdID with intervalMs=0, as described in the API documentation:

grafik

qsivey commented 1 year ago

By sending the same cmdID with intervalMs=0, as described in the API documentation:

grafik

Hello! Sorry for delay

Now you can try a 1.0 version. Currently it is contains the SBGC32_StopDataStream() function. Regarding your quetion about RealTimeDataCustom_t structure. If you don't find the data you need, you can look at other realtime functions.

poett1 commented 1 week ago

This is still an error with the latest API version and Firmware 2.72.1_214

SBGC32_StopDataStream returns sbgcCOMMAND_RX_ERROR With debug Output: --> CMD_DATA_STREAM_INTERVAL (#85): PROCESSED <-- CMD_CONFIRM (#67): ERROR

qsivey commented 5 days ago

Hello! Was your problem fixed already? If not, please contact our support and attach the executable and config.h files. support@basecamelectronics.com

poett1 commented 5 days ago

0001-added-SBGC32_StopDataStream-and-error-handling.patch No, it is not solved. You can reproduce it by applying the supplied patch to this repo and running examples/Linux/DemoLaunch. As we already have this issue open, i would not like to open it on another channel.