ADC alerts and emergency stop functions added
Check for overvoltage/undervoltage conditions after each ADC reading cycle and trigger alert (stopping DC/DC, PWM switch and load output) if limits exceeded.
This commit is contained in:
@@ -209,6 +209,12 @@ void PwmSwitch::control()
|
||||
}
|
||||
}
|
||||
|
||||
void PwmSwitch::emergency_stop()
|
||||
{
|
||||
pwm_signal_stop();
|
||||
off_timestamp = time(NULL);
|
||||
}
|
||||
|
||||
float PwmSwitch::get_duty_cycle()
|
||||
{
|
||||
return pwm_signal_get_duty_cycle();
|
||||
|
||||
Reference in New Issue
Block a user