Merge pull request #6612 from smoriarty21/copy_rate_profile

Allow copying to rate profile 6
This commit is contained in:
Michael Keller 2018-08-25 23:33:24 +12:00 committed by GitHub
commit b51db9b7c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
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
) {
memcpy(controlRateProfilesMutable(dstControlRateProfileIndex), controlRateProfilesMutable(srcControlRateProfileIndex), sizeof(controlRateConfig_t));