Allow copying of rate profile 6

This commit is contained in:
Sean M 2018-08-21 19:49:08 -04:00
parent f463dad8bd
commit ab8f9af8ee
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ void changeControlRateProfile(uint8_t controlRateProfileIndex)
} }
void copyControlRateProfile(const uint8_t dstControlRateProfileIndex, const uint8_t srcControlRateProfileIndex) { void copyControlRateProfile(const uint8_t dstControlRateProfileIndex, const uint8_t srcControlRateProfileIndex) {
if ((dstControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT-1 && srcControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT-1) if ((dstControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT && srcControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT)
&& dstControlRateProfileIndex != srcControlRateProfileIndex && dstControlRateProfileIndex != srcControlRateProfileIndex
) { ) {
memcpy(controlRateProfilesMutable(dstControlRateProfileIndex), controlRateProfilesMutable(srcControlRateProfileIndex), sizeof(controlRateConfig_t)); memcpy(controlRateProfilesMutable(dstControlRateProfileIndex), controlRateProfilesMutable(srcControlRateProfileIndex), sizeof(controlRateConfig_t));