1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

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

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));