Merge pull request #9499 from Asizon/motorOutputLimitMsp

Motor_output_limit settings to msp
This commit is contained in:
Michael Keller 2020-02-22 15:52:08 +13:00 committed by GitHub
commit f68b0422da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -1793,6 +1793,9 @@ static bool mspProcessOutCommand(int16_t cmdMSP, sbuf_t *dst)
#else
sbufWriteU8(dst, 0);
#endif
// Added in MSP API 1.43
sbufWriteU8(dst, currentPidProfile->motor_output_limit);
sbufWriteU8(dst, currentPidProfile->auto_profile_cell_count);
break;
case MSP_SENSOR_CONFIG:
@ -2634,6 +2637,11 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
sbufReadU8(src);
#endif
}
if(sbufBytesRemaining(src) >= 2) {
// Added in MSP API 1.43
currentPidProfile->motor_output_limit = sbufReadU8(src);
currentPidProfile->auto_profile_cell_count = sbufReadU8(src);
}
pidInitConfig(currentPidProfile);
break;