From 666db27d6e89b4e98f1d42ddce007b5ac0e5caba Mon Sep 17 00:00:00 2001 From: Greg Sandstrom Date: Wed, 10 Jan 2024 14:24:12 -0800 Subject: [PATCH] add safe_bearing_limit config parameter to suppress temperature warning as long as the hottest bearing is below this limit (e.g. for polar mode when tap water is wamer than air) --- alarmist_config.ini | 5 ++++- ssa/alarm/alarmist.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/alarmist_config.ini b/alarmist_config.ini index b4c9e2c..0745222 100644 --- a/alarmist_config.ini +++ b/alarmist_config.ini @@ -9,4 +9,7 @@ dbname = paddle coolant = 2 on_torque = 2 moving_torque = 20 -ambient_temperature_delta = 0.2 \ No newline at end of file +# warn about bearing temperature if they are ambient_temperatre_delta above ambient +ambient_temperature_delta = 0.2 +# only warn about bearing temperature if they are warmer than safe_bearing_limit +safe_bearing_limit = 25.0 \ No newline at end of file diff --git a/ssa/alarm/alarmist.py b/ssa/alarm/alarmist.py index f074df0..96fd3df 100644 --- a/ssa/alarm/alarmist.py +++ b/ssa/alarm/alarmist.py @@ -167,7 +167,9 @@ class Alarmist: ) bearing_temperature_warning = False if ambient > 0 and max_bearing > 0: - if max_bearing > ambient + ambient_delta: + if (max_bearing > ambient + ambient_delta) and ( + max_bearing > float(self.config["thresholds"]["safe_bearing_limit"]) + ): bearing_temperature_warning = True dprint( -- 1.9.1