mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
Implement MSP2_INAV_STATUS as a variation an improved MSP_STATUS_EX,
providing a 32 bit armingFlags (no other changes).
This commit is contained in:
parent
733e425045
commit
73b4f3157c
2 changed files with 13 additions and 6 deletions
|
@ -355,6 +355,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP2_INAV_STATUS:
|
||||
case MSP_STATUS_EX:
|
||||
case MSP_STATUS:
|
||||
{
|
||||
|
@ -371,8 +372,11 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
sbufWriteData(dst, &mspBoxModeFlags, 4);
|
||||
sbufWriteU8(dst, getConfigProfile());
|
||||
|
||||
if (cmdMSP == MSP_STATUS_EX) {
|
||||
if (cmdMSP != MSP_STATUS) {
|
||||
sbufWriteU16(dst, averageSystemLoadPercent);
|
||||
if (cmdMSP == MSP2_INAV_STATUS)
|
||||
sbufWriteU32(dst, armingFlags);
|
||||
else
|
||||
sbufWriteU16(dst, armingFlags);
|
||||
sbufWriteU8(dst, accGetCalibrationAxisFlags());
|
||||
}
|
||||
|
|
|
@ -15,4 +15,7 @@
|
|||
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//#define MSP2_INAV_STATUS 0x1000
|
||||
// iNav specific IDs start from 0x2000
|
||||
// See https://github.com/iNavFlight/inav/wiki/MSP-V2#msp-v2-message-catalogue
|
||||
|
||||
#define MSP2_INAV_STATUS 0x2000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue