1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Merge branch 'betaflight' into ready_to_merge

# Conflicts:
#	src/main/io/serial_msp.c
This commit is contained in:
blckmn 2016-06-20 18:16:22 +10:00
commit c889f00d26
3 changed files with 32 additions and 28 deletions

View file

@ -1258,9 +1258,10 @@ static bool processOutCommand(uint8_t cmdMSP)
serialize8(masterConfig.sensorAlignmentConfig.mag_align);
break;
case MSP_PID_ADVANCED_CONFIG :
headSerialReply(5);
headSerialReply(6);
serialize8(masterConfig.gyro_sync_denom);
serialize8(masterConfig.pid_process_denom);
serialize8(0);
serialize8(masterConfig.motor_pwm_protocol);
serialize16(masterConfig.motor_pwm_rate);
break;
@ -1712,26 +1713,6 @@ static bool processInCommand(void)
case MSP_SET_BF_CONFIG:
case MSP_SET_PID_ADVANCED_CONFIG :
masterConfig.gyro_sync_denom = read8();
masterConfig.pid_process_denom = read8();
masterConfig.motor_pwm_protocol = read8();
masterConfig.motor_pwm_rate = read16();
break;
case MSP_SET_FILTER_CONFIG :
masterConfig.gyro_soft_lpf_hz = read8();
currentProfile->pidProfile.dterm_lpf_hz = read16();
currentProfile->pidProfile.yaw_lpf_hz = read16();
break;
case MSP_SET_ADVANCED_TUNING:
currentProfile->pidProfile.rollPitchItermIgnoreRate = read16();
currentProfile->pidProfile.yawItermIgnoreRate = read16();
currentProfile->pidProfile.yaw_p_limit = read16();
break;
case MSP_SET_TEMPORARY_COMMANDS:
currentControlRateProfile->rcYawRate8 = read8();
break;
#ifdef USE_QUAD_MIXER_ONLY
read8(); // mixerMode ignored
#else
@ -1846,6 +1827,27 @@ static bool processInCommand(void)
// proceed as usual with MSP commands
break;
#endif
case MSP_SET_PID_ADVANCED_CONFIG :
masterConfig.gyro_sync_denom = read8();
masterConfig.pid_process_denom = read8();
read8();
masterConfig.motor_pwm_protocol = read8();
masterConfig.motor_pwm_rate = read16();
break;
case MSP_SET_FILTER_CONFIG :
masterConfig.gyro_soft_lpf_hz = read8();
currentProfile->pidProfile.dterm_lpf_hz = read16();
currentProfile->pidProfile.yaw_lpf_hz = read16();
break;
case MSP_SET_ADVANCED_TUNING:
currentProfile->pidProfile.rollPitchItermIgnoreRate = read16();
currentProfile->pidProfile.yawItermIgnoreRate = read16();
currentProfile->pidProfile.yaw_p_limit = read16();
break;
case MSP_SET_TEMPORARY_COMMANDS:
currentControlRateProfile->rcYawRate8 = read8();
break;
default:
// we do not know how to handle the (valid) message, indicate error MSP $M!
return false;