1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Merge branch 'betaflight' into ready_to_merge

# Conflicts:
#	src/main/version.h
This commit is contained in:
blckmn 2016-06-22 06:30:38 +10:00
commit 3e72bb5e3b
2 changed files with 15 additions and 1 deletions

View file

@ -1272,7 +1272,7 @@ static bool processOutCommand(uint8_t cmdMSP)
serialize16(currentProfile->pidProfile.yaw_lpf_hz); serialize16(currentProfile->pidProfile.yaw_lpf_hz);
break; break;
case MSP_ADVANCED_TUNING: case MSP_ADVANCED_TUNING:
headSerialReply(3 * 3); headSerialReply(3 * 2);
serialize16(currentProfile->pidProfile.rollPitchItermIgnoreRate); serialize16(currentProfile->pidProfile.rollPitchItermIgnoreRate);
serialize16(currentProfile->pidProfile.yawItermIgnoreRate); serialize16(currentProfile->pidProfile.yawItermIgnoreRate);
serialize16(currentProfile->pidProfile.yaw_p_limit); serialize16(currentProfile->pidProfile.yaw_p_limit);
@ -1281,6 +1281,12 @@ static bool processOutCommand(uint8_t cmdMSP)
headSerialReply(1); headSerialReply(1);
serialize8(currentControlRateProfile->rcYawRate8); serialize8(currentControlRateProfile->rcYawRate8);
break; break;
case MSP_SENSOR_CONFIG:
headSerialReply(3);
serialize8(masterConfig.acc_hardware);
serialize8(masterConfig.baro_hardware);
serialize8(masterConfig.mag_hardware);
break;
default: default:
return false; return false;
@ -1848,6 +1854,11 @@ static bool processInCommand(void)
case MSP_SET_TEMPORARY_COMMANDS: case MSP_SET_TEMPORARY_COMMANDS:
currentControlRateProfile->rcYawRate8 = read8(); currentControlRateProfile->rcYawRate8 = read8();
break; break;
case MSP_SET_SENSOR_CONFIG:
masterConfig.acc_hardware = read8();
masterConfig.baro_hardware = read8();
masterConfig.mag_hardware = read8();
break;
default: default:
// we do not know how to handle the (valid) message, indicate error MSP $M! // we do not know how to handle the (valid) message, indicate error MSP $M!
return false; return false;

View file

@ -203,6 +203,9 @@ static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER;
#define MSP_ADVANCED_TUNING 94 #define MSP_ADVANCED_TUNING 94
#define MSP_SET_ADVANCED_TUNING 95 #define MSP_SET_ADVANCED_TUNING 95
#define MSP_SENSOR_CONFIG 96
#define MSP_SET_SENSOR_CONFIG 97
#define MSP_TEMPORARY_COMMANDS 98 // Temporary Commands before cleanup #define MSP_TEMPORARY_COMMANDS 98 // Temporary Commands before cleanup
#define MSP_SET_TEMPORARY_COMMANDS 99 // Temporary Commands before cleanup #define MSP_SET_TEMPORARY_COMMANDS 99 // Temporary Commands before cleanup