-
Notifications
You must be signed in to change notification settings - Fork 16.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_Frsky_Telem: added VSpd to telemetry protocol 4 #12352
Conversation
@tridge this is a pretty trivial change but as soon as I enable the WITHSEMAPHORE on ahrs here I get the very same problem we fixed a couple weeks ago by moving the frsky lib to his own thread: |
63cc622
to
7ec4fcb
Compare
Code has been reorganized:
This has been tested on MatekF405-Wing, please check here for further info #12245 |
@@ -184,7 +185,7 @@ void AP_Frsky_Telem::send_SPort_Passthrough(void) | |||
*/ | |||
void AP_Frsky_Telem::send_SPort(void) | |||
{ | |||
const AP_AHRS &_ahrs = AP::ahrs(); | |||
//const AP_AHRS &_ahrs = AP::ahrs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to just remove code, not comment out
_SPort.next_sensor_id = SENSOR_ID_FAS; | ||
break; | ||
} | ||
if (++_SPort.vario_call > 2) _SPort.vario_call = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check coding style (see bit about curly braces on statements}
|
||
AP_AHRS &_ahrs = AP::ahrs(); | ||
|
||
WITH_SEMAPHORE(_ahrs.get_semaphore()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd prefer to get only one sem at a time (not hold AHRS and baro at same time)
7ec4fcb
to
0666bcd
Compare
@tridge I refactored my changes to minimize semaphore's scope |
The Frsky vario "virtual" sensor was reporting altitude but not vertical speed. This patch adds VSpd as a new sensor when protocol 4 is selected. GPS frsky sensor is migrated to 2 byte sensor ID and needs rediscovery if using the previous 1 byte version
0666bcd
to
111781b
Compare
this fails the plane frsky sport mode test in CI. We either need to change the test, or fix the frsky code if the test is correct |
thanks @tridge, |
…r types This adds support for the VARIO sensor 0x30 and GPS sensor 0x800 to the autotest suite
The Frsky vario "virtual" sensor was reporting altitude but not vertical speed.
This patch adds VSpd as a new sensor when protocol 4 is selected.
Notes:
related issue
#12245