mirror of https://github.com/rusefi/bldc.git
app adc: allow hardwares to override the brake input
With this hook the brake can be overriden from the hw_*.c file without polluting the app configuration UI. Some examples of commanded braking: * Tilt/crash sensor * Gear shift sensor * Emergency stop * Kill switch Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
This commit is contained in:
parent
14b25e9aa4
commit
d8d2088137
|
@ -186,6 +186,9 @@ static THD_FUNCTION(adc_thread, arg) {
|
|||
float brake = 0.0;
|
||||
#endif
|
||||
|
||||
#ifdef HW_HAS_BRAKE_OVERRIDE
|
||||
hw_brake_override(&brake);
|
||||
#endif
|
||||
read_voltage2 = brake;
|
||||
|
||||
// Optionally apply a mean value filter
|
||||
|
|
Loading…
Reference in New Issue