CJ125 heater zero PWM improvement
This commit is contained in:
parent
a1e4880bb9
commit
5ced490687
|
@ -75,7 +75,7 @@ void SimplePwm::setSimplePwmDutyCycle(float dutyCycle) {
|
||||||
warning(CUSTOM_ERR_6579, "spwd:dutyCycle %.2f", dutyCycle);
|
warning(CUSTOM_ERR_6579, "spwd:dutyCycle %.2f", dutyCycle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (dutyCycle == 0.0f) {
|
if (dutyCycle == 0.0f && stateChangeCallback != NULL) {
|
||||||
/**
|
/**
|
||||||
* set the pin low just to be super sure
|
* set the pin low just to be super sure
|
||||||
* this custom handling of zero value comes from CJ125 heater code
|
* this custom handling of zero value comes from CJ125 heater code
|
||||||
|
|
|
@ -96,7 +96,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* this main callback is invoked when it's time to switch level on any of the output channels
|
* this main callback is invoked when it's time to switch level on any of the output channels
|
||||||
*/
|
*/
|
||||||
pwm_gen_callback *stateChangeCallback;
|
pwm_gen_callback *stateChangeCallback = NULL;
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* float value of PWM period
|
* float value of PWM period
|
||||||
|
|
Loading…
Reference in New Issue