mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
added new MSP command for deadband, yaw deadband, .... content of rcControlsConfig_s
This commit is contained in:
parent
cd609c5019
commit
25f7511e6b
1 changed files with 17 additions and 0 deletions
|
@ -281,6 +281,7 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
#define MSP_NAV_STATUS 121 //out message Returns navigation status
|
||||
#define MSP_NAV_CONFIG 122 //out message Returns navigation parameters
|
||||
#define MSP_3D 124 //out message Settings needed for reversible ESCs
|
||||
#define MSP_RC_CONTROLS 125 //out message deadbands for yaw alt pitch roll
|
||||
|
||||
#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
|
||||
|
@ -298,6 +299,7 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
|||
#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_3D 217 //in message Settings needed for reversible ESCs
|
||||
#define MSP_SET_RC_CONTROLS 218 //in message deadbands for yaw alt pitch roll
|
||||
|
||||
// #define MSP_BIND 240 //in message no param
|
||||
|
||||
|
@ -1283,6 +1285,14 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
serialize16(masterConfig.flight3DConfig.deadband3d_throttle);
|
||||
break;
|
||||
|
||||
case MSP_RC_CONTROLS:
|
||||
headSerialReply(4);
|
||||
serialize8(currentProfile->rcControlsConfig.deadband);
|
||||
serialize8(currentProfile->rcControlsConfig.yaw_deadband);
|
||||
serialize8(currentProfile->rcControlsConfig.alt_hold_deadband);
|
||||
serialize8(currentProfile->rcControlsConfig.alt_hold_fast_change);
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -1511,6 +1521,13 @@ static bool processInCommand(void)
|
|||
masterConfig.flight3DConfig.neutral3d = read16();
|
||||
masterConfig.flight3DConfig.deadband3d_throttle = read16();
|
||||
break;
|
||||
|
||||
case MSP_SET_RC_CONTROLS:
|
||||
currentProfile->rcControlsConfig.deadband = read8();
|
||||
currentProfile->rcControlsConfig.yaw_deadband = read8();
|
||||
currentProfile->rcControlsConfig.alt_hold_deadband = read8();
|
||||
currentProfile->rcControlsConfig.alt_hold_fast_change = read8();
|
||||
break;
|
||||
|
||||
case MSP_RESET_CONF:
|
||||
if (!ARMING_FLAG(ARMED)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue