Update to ensure serial_cli list matches enum for PWM protocols

This commit is contained in:
blckmn 2017-01-11 10:57:12 +11:00
parent af9a7f8eae
commit 1c4e5aceda
2 changed files with 4 additions and 0 deletions

View File

@ -28,10 +28,12 @@ typedef enum {
PWM_TYPE_ONESHOT42,
PWM_TYPE_MULTISHOT,
PWM_TYPE_BRUSHED,
#ifdef USE_DSHOT
PWM_TYPE_DSHOT150,
PWM_TYPE_DSHOT300,
PWM_TYPE_DSHOT600,
PWM_TYPE_DSHOT1200,
#endif
PWM_TYPE_MAX
} motorPwmProtocolTypes_e;

View File

@ -1079,12 +1079,14 @@ void validateAndFixGyroConfig(void)
case (PWM_TYPE_ONESHOT42):
motorUpdateRestriction = 0.0001f;
break;
#ifdef USE_DSHOT
case (PWM_TYPE_DSHOT150):
motorUpdateRestriction = 0.000250f;
break;
case (PWM_TYPE_DSHOT300):
motorUpdateRestriction = 0.0001f;
break;
#endif
default:
motorUpdateRestriction = 0.00003125f;
}