Sub: set_leak_status() -> failsafe_leak_check()

This commit is contained in:
Jacob Walser 2017-03-24 14:37:45 -04:00
parent 7859f6426e
commit 45328f220c
3 changed files with 7 additions and 3 deletions

View File

@ -345,7 +345,9 @@ void Sub::dataflash_periodic(void)
// three_hz_loop - 3.3hz loop
void Sub::three_hz_loop()
{
set_leak_status(leak_detector.update());
leak_detector.update();
failsafe_leak_check();
failsafe_internal_pressure_check();

View File

@ -782,7 +782,7 @@ private:
void dataflash_periodic(void);
void accel_cal_update(void);
void set_leak_status(bool status);
void failsafe_leak_check();
void failsafe_internal_pressure_check();
void failsafe_internal_temperature_check();

View File

@ -194,8 +194,10 @@ void Sub::failsafe_internal_temperature_check()
}
}
void Sub::set_leak_status(bool status)
void Sub::failsafe_leak_check()
{
bool status = leak_detector.get_status();
AP_Notify::flags.leak_detected = status;
// Do nothing if we are dry, or if leak failsafe action is disabled