1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Add ascend and descend rate to MSP (#8977)

Add ascend and descend rate to MSP
This commit is contained in:
Michael Keller 2019-10-18 03:32:44 +13:00 committed by GitHub
commit 50ed636e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1291,6 +1291,9 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
sbufWriteU16(dst, gpsRescueConfig()->throttleHover);
sbufWriteU8(dst, gpsRescueConfig()->sanityChecks);
sbufWriteU8(dst, gpsRescueConfig()->minSats);
// Added in API version 1.43
sbufWriteU16(dst, gpsRescueConfig()->ascendRate);
sbufWriteU16(dst, gpsRescueConfig()->descendRate);
break;
case MSP_GPS_RESCUE_PIDS:
@ -2181,6 +2184,11 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, uint8_t cmdMSP,
gpsRescueConfigMutable()->throttleHover = sbufReadU16(src);
gpsRescueConfigMutable()->sanityChecks = sbufReadU8(src);
gpsRescueConfigMutable()->minSats = sbufReadU8(src);
if (sbufBytesRemaining(src) >= 4) {
// Added in API version 1.43
gpsRescueConfigMutable()->ascendRate = sbufReadU16(src);
gpsRescueConfigMutable()->descendRate = sbufReadU16(src);
}
break;
case MSP_SET_GPS_RESCUE_PIDS: