🏗️ Allow headless Flow Meter (#22234)

This commit is contained in:
Mike La Spina
2021-07-12 00:22:08 -05:00
committed by GitHub
parent 2c6a053ce1
commit c0ecc6625f
5 changed files with 19 additions and 17 deletions

View File

@@ -94,12 +94,12 @@ public:
}
#if ENABLED(FLOWMETER_SAFETY)
static bool fault; // Flag that the cooler is in a fault state
static bool flowsafety_enabled; // Flag to disable the cutter if flow rate is too low
static bool flowfault; // Flag that the cooler is in a fault state
static bool flowsafety_enabled; // Flag to disable the cutter if flow rate is too low
static void flowsafety_toggle() { flowsafety_enabled = !flowsafety_enabled; }
static bool check_flow_too_low() {
const bool too_low = flowsafety_enabled && flowrate < (FLOWMETER_MIN_LITERS_PER_MINUTE);
if (too_low) fault = true;
flowfault = too_low;
return too_low;
}
#endif