better error message
This commit is contained in:
parent
5ca6b5dfca
commit
0fe7598c7d
|
@ -52,7 +52,9 @@ void PwmConfig::init(float *st, single_wave_s *waves) {
|
|||
* @param dutyCycle value between 0 and 1
|
||||
*/
|
||||
void SimplePwm::setSimplePwmDutyCycle(float dutyCycle) {
|
||||
efiAssertVoid(dutyCycle >= 0 && dutyCycle <= 1, "spwd:dutyCycle");
|
||||
if (dutyCycle < 0 || dutyCycle > 1) {
|
||||
firmwareError(CUSTOM_ERR_ASSERT_VOID, "spwd:dutyCycle %f", dutyCycle);
|
||||
}
|
||||
multiWave.setSwitchTime(0, dutyCycle);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue