vedderb / bldc

The VESC motor control firmware
2.09k stars 1.31k forks source link

Better support for digital/ switch-based brakes #678

Open AkbarRamzan opened 7 months ago

AkbarRamzan commented 7 months ago

The problem with the adc app is that the ramping time affects both brake and throttle. I have an adc throttle but reed switch / digital brake and pressing the brakes causes the brake input to turn on too quickly. I want the regen brake to become stronger over time and ramp up more slowly but keep the throttle responsive. Can we have separate ramp up/ down times?

tmgofer commented 7 months ago

So you have on/off switch on ADC2? Do i understand correctly?

it shouldn’t take more than 15 lines of LISP script…

AkbarRamzan commented 7 months ago

Correct, yes but I prefer it done in the firmware as it safety-critical. What if you have a throttle runaway event and lisp crashes?

tmgofer commented 7 months ago

Implement native C function, then. Just call it from LISP. I’ve done that and it works really well. Still, for such low computation functionality I’d suggest simply using LISP…