mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Deleted extra 32bit altitude in msp
This commit is contained in:
parent
ecc89d1ba1
commit
ff366098e5
1 changed files with 1 additions and 5 deletions
|
@ -1033,10 +1033,9 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
||||||
sbufWriteU8(dst, gpsSol.numSat);
|
sbufWriteU8(dst, gpsSol.numSat);
|
||||||
sbufWriteU32(dst, gpsSol.llh.lat);
|
sbufWriteU32(dst, gpsSol.llh.lat);
|
||||||
sbufWriteU32(dst, gpsSol.llh.lon);
|
sbufWriteU32(dst, gpsSol.llh.lon);
|
||||||
sbufWriteU16(dst, MIN(gpsSol.llh.alt / 10, 65535));
|
sbufWriteU16(dst, (uint16_t)constrain(gpsSol.llh.alt / 10, 0, UINT16_MAX));
|
||||||
sbufWriteU16(dst, gpsSol.groundSpeed);
|
sbufWriteU16(dst, gpsSol.groundSpeed);
|
||||||
sbufWriteU16(dst, gpsSol.groundCourse);
|
sbufWriteU16(dst, gpsSol.groundCourse);
|
||||||
sbufWriteU32(dst, gpsSol.llh.alt);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_COMP_GPS:
|
case MSP_COMP_GPS:
|
||||||
|
@ -1902,9 +1901,6 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
||||||
gpsSol.llh.lon = sbufReadU32(src);
|
gpsSol.llh.lon = sbufReadU32(src);
|
||||||
gpsSol.llh.alt = sbufReadU16(src) * 10;
|
gpsSol.llh.alt = sbufReadU16(src) * 10;
|
||||||
gpsSol.groundSpeed = sbufReadU16(src);
|
gpsSol.groundSpeed = sbufReadU16(src);
|
||||||
if (sbufBytesRemaining(src) >= 4) {
|
|
||||||
gpsSol.llh.alt = sbufReadU32(src);
|
|
||||||
}
|
|
||||||
GPS_update |= 2; // New data signalisation to GPS functions // FIXME Magic Numbers
|
GPS_update |= 2; // New data signalisation to GPS functions // FIXME Magic Numbers
|
||||||
break;
|
break;
|
||||||
#endif // USE_GPS
|
#endif // USE_GPS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue