1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Deleted extra 32bit altitude in msp

This commit is contained in:
AirBreak69 2018-06-14 20:58:41 +02:00 committed by GitHub
parent ecc89d1ba1
commit ff366098e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1033,10 +1033,9 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
sbufWriteU8(dst, gpsSol.numSat);
sbufWriteU32(dst, gpsSol.llh.lat);
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.groundCourse);
sbufWriteU32(dst, gpsSol.llh.alt);
break;
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.alt = sbufReadU16(src) * 10;
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
break;
#endif // USE_GPS