fix: HybridStepper: center around supply voltage#536
Conversation
|
This seems to make sense from a code point of view, but from a use-case point of view, what would be the point of setting the voltage limit higher than the power supply voltage? It seems to me this is checking for what is essentially a configuration error, but at the level of the setPwm(). I'd prefer to check it in the |
|
hm, then i have to check the doc again what the driver voltage is supposed to do. This did come up as a problem as i am updating voltage_power supply to some thing that gets measured. if then it is e.g. going from 24 to 20 gradualy it goes below the driver limit. |
Description
The Hybrid stepper centered its voltage around the driver voltage limit and not the current supply voltage. In the case the voltage limit of the driver is bigger than the supply this leads the center not really being the center.
Type of change
To respect the current logic the center point is now
min(supply_voltage, driver_max_voltage)How Has This Been Tested?
voltage_power_supplymeasurement)