From 8d0b6cfb4082b2a462ccaade7f283357d780e9f5 Mon Sep 17 00:00:00 2001 From: Spencer Owen Date: Wed, 16 Aug 2017 11:07:51 -0600 Subject: [PATCH] Add output for small_angle --- src/main/fc/fc_msp.c | 4 ++++ src/main/msp/msp_protocol.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index aae0ec773c..354d2ae5a6 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -861,6 +861,7 @@ static bool mspFcProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) case MSP_ARMING_CONFIG: sbufWriteU8(dst, armingConfig()->auto_disarm_delay); sbufWriteU8(dst, armingConfig()->disarm_kill_switch); + sbufWriteU8(dst, imuConfig()->small_angle); break; case MSP_RC_TUNING: @@ -1362,6 +1363,9 @@ static mspResult_e mspFcProcessInCommand(uint8_t cmdMSP, sbuf_t *src) case MSP_SET_ARMING_CONFIG: armingConfigMutable()->auto_disarm_delay = sbufReadU8(src); armingConfigMutable()->disarm_kill_switch = sbufReadU8(src); + if (sbufBytesRemaining(src)) { + imuConfigMutable()->small_angle = sbufReadU8(src); + } break; case MSP_SET_PID_CONTROLLER: diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index fbcc14ee4f..278e9d3aec 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -149,8 +149,8 @@ #define MSP_PID_CONTROLLER 59 #define MSP_SET_PID_CONTROLLER 60 -#define MSP_ARMING_CONFIG 61 //out message Returns auto_disarm_delay and disarm_kill_switch parameters -#define MSP_SET_ARMING_CONFIG 62 //in message Sets auto_disarm_delay and disarm_kill_switch parameters +#define MSP_ARMING_CONFIG 61 +#define MSP_SET_ARMING_CONFIG 62 // // Baseflight MSP commands (if enabled they exist in Cleanflight)