Closed pierre83 closed 3 years ago
The step amount has to be an integer number and I don't want it to be zero, which is why it has to be at least 1. The pwm will fluctuate up and down around the ideal point. Line 249 is so that when the target pwn is far away from the current pwm, it takes steps that are larger than 1 to get there in fewer cycles.
It seems to be an error in the process (lines 249 - 263) When stepAmount is < 1 then it value is 1, but when (Vcvm - panelVolts) /10 is -50 (for example) then the step is forced to 1, then the PWM is not correctly adjusted because a too little step.