From 22a44ea12479a41275e05eaedf2f73107fee04c4 Mon Sep 17 00:00:00 2001 From: Greg Sandstrom Date: Thu, 6 Jul 2023 12:29:58 -0700 Subject: [PATCH] dont consider paddle moving if paddle is below paddle_on torque --- ssa/alarm/alarmist.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ssa/alarm/alarmist.py b/ssa/alarm/alarmist.py index 10459ea..e204dae 100644 --- a/ssa/alarm/alarmist.py +++ b/ssa/alarm/alarmist.py @@ -150,9 +150,10 @@ class Alarmist: ) paddle_on = torque > float(self.config["thresholds"]["on_torque"]) # Check three last points to see if paddle is moving - paddle_moving = ( - torque > float(self.config["thresholds"]["moving_torque"]) - ) or (torque != previous_torque or previous_torque != previouser_torque) + paddle_moving = paddle_on and ( + (torque > float(self.config["thresholds"]["moving_torque"])) + or (torque != previous_torque or previous_torque != previouser_torque) + ) # check if coolant is flowing (coolant_flow_rate, _) = self.soars_state.get( "coolant_flow_rate", (0.0, None) -- 1.9.1