mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Use MSP command IDs in the correct assigned range for MSP_LOOPTIME and
MSP_ARMING_CONFIG. Rename MSP_ARM_CONFIG to MSP_ARMING_CONFIG.
This commit is contained in:
parent
c68d95dd7a
commit
60835923c4
1 changed files with 9 additions and 6 deletions
|
@ -217,6 +217,13 @@ const char *boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
|
||||
#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_LOOP_TIME 63 //out message Returns FC cycle time i.e looptime parameter
|
||||
#define MSP_SET_LOOP_TIME 64 //in message Sets FC cycle time i.e looptime parameter
|
||||
|
||||
//
|
||||
// Baseflight MSP commands (if enabled they exist in Cleanflight)
|
||||
//
|
||||
|
@ -267,8 +274,6 @@ const char *boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
#define MSP_SERVO_CONF 120 //out message Servo settings
|
||||
#define MSP_NAV_STATUS 121 //out message Returns navigation status
|
||||
#define MSP_NAV_CONFIG 122 //out message Returns navigation parameters
|
||||
#define MSP_ARM_CONFIG 123 //out message Returns auto_disarm_delay and disarm_kill_switch parameters
|
||||
#define MSP_LOOP_TIME 124 //out message Returns FC cycle time i.e looptime parameter
|
||||
|
||||
#define MSP_SET_RAW_RC 200 //in message 8 rc chan
|
||||
#define MSP_SET_RAW_GPS 201 //in message fix, numsat, lat, lon, alt, speed
|
||||
|
@ -285,8 +290,6 @@ const char *boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
#define MSP_SET_SERVO_CONF 212 //in message Servo settings
|
||||
#define MSP_SET_MOTOR 214 //in message PropBalance function
|
||||
#define MSP_SET_NAV_CONFIG 215 //in message Sets nav config parameters - write to the eeprom
|
||||
#define MSP_SET_ARM_CONFIG 216 //in message Sets auto_disarm_delay and disarm_kill_switch parameters
|
||||
#define MSP_SET_LOOP_TIME 217 //in message Sets FC cycle time i.e looptime parameter
|
||||
|
||||
// #define MSP_BIND 240 //in message no param
|
||||
|
||||
|
@ -893,7 +896,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
} else
|
||||
serialize16((int16_t)constrain(amperage, -0x8000, 0x7FFF)); // send amperage in 0.01 A steps, range is -320A to 320A
|
||||
break;
|
||||
case MSP_ARM_CONFIG:
|
||||
case MSP_ARMING_CONFIG:
|
||||
headSerialReply(2);
|
||||
serialize8(masterConfig.auto_disarm_delay);
|
||||
serialize8(masterConfig.disarm_kill_switch);
|
||||
|
@ -1270,7 +1273,7 @@ static bool processInCommand(void)
|
|||
currentProfile->accelerometerTrims.values.pitch = read16();
|
||||
currentProfile->accelerometerTrims.values.roll = read16();
|
||||
break;
|
||||
case MSP_SET_ARM_CONFIG:
|
||||
case MSP_SET_ARMING_CONFIG:
|
||||
masterConfig.auto_disarm_delay = read8();
|
||||
masterConfig.disarm_kill_switch = read8();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue