OpenTX 2.2.2 G-speed sensor from Crossfire/BF incorrect value

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
siamect
Posts: 2
Joined: Mon Sep 17, 2018 3:05 pm
Country: -

OpenTX 2.2.2 G-speed sensor from Crossfire/BF incorrect value

Post by siamect »

Dear All

OpenTX 2.2.2 G-speed sensor from Crossfire/Betaflight shows incorrect value on my QX7. I don't know exactly but it looks like it is 10 times too high.
I checked the code a little and it looks like this in Betaflight:

Code: Select all

sbufWriteU16BigEndian(dst, (gpsSol.groundSpeed * 36 + 5) / 10); // gpsSol.groundSpeed is in 0.1m/s
in the file:
https://github.com/betaflight/betafligh ... rsf.c#L182

The result is a value in km/h multiplied by 10 and in OpenTX 2.2.2 the value is not divided with anything:

Code: Select all

if (getCrossfireTelemetryValue<2>(11, value)) 
	processCrossfireTelemetryValue(GPS_GROUND_SPEED_INDEX, value);
in the file
https://github.com/opentx/opentx/blob/2 ... e.cpp#L111

So, to me, it seems like a mismatch between what OpenTX need and what Betaflight delivers.
I assume that the multiplication by 10 is done to get the first decimal into the telemetry stream of integer values.
So based on this OpenTX should divide by 10.

Anyone having any opinion about this? Is there any configuration in OpenTX I can use to make the G-speed show correct value?
/Martin

User avatar
3djc
Posts: 77
Joined: Mon Feb 22, 2016 7:15 am
Country: -

Re: OpenTX 2.2.2 G-speed sensor from Crossfire/BF incorrect value

Post by 3djc »

I believe we followed the Crossfire sensor specs. I'll double check those
siamect
Posts: 2
Joined: Mon Sep 17, 2018 3:05 pm
Country: -

Re: OpenTX 2.2.2 G-speed sensor from Crossfire/BF incorrect value

Post by siamect »

It has been taken care of by Betaflight dev etracer65 already and the pull request was approved:

https://github.com/betaflight/betaflight/pull/6793

Thanks!
/Martin

Post Reply

Return to “openTx”