From 4bc6c6c8d078020afe6dce4ad185a3408ea0d1e7 Mon Sep 17 00:00:00 2001 From: Matt Lawrence Date: Fri, 10 Jan 2020 18:10:58 -0500 Subject: [PATCH] Shotmanager: Fix instantiation --- shotmanager/shotManager.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shotmanager/shotManager.py b/shotmanager/shotManager.py index 7e8a855..db2fffc 100644 --- a/shotmanager/shotManager.py +++ b/shotmanager/shotManager.py @@ -542,21 +542,21 @@ class ShotManager(): # Warn if battery cell is low, differential too high, or capacity sucks if self.batt_cell_min < BATT_CELL_LOW_WARN and self.vehicle.system_status not in ['CRITICAL', 'EMERGENCY'] and self.batt_cell_low_warned == False: - str_BattHealth = "Warning, Low battery cell voltage: %1.2fV" % round((self.batt_cell_min * 0.001),2) + self.str_BattHealth = "Warning, Low battery cell voltage: %1.2fV" % round((self.batt_cell_min * 0.001),2) self.batt_cell_low_warned = True self.batt_last_warned = time.time() elif self.batt_cell_diff > BATT_CELL_DIFF_WARN and self.batt_cell_diff_warned == False: - str_BattHealth = "Warning, Battery cell differential: %dmV" % self.batt_cell_diff + self.str_BattHealth = "Warning, Battery cell differential: %dmV" % self.batt_cell_diff self.batt_cell_diff_warned = True self.batt_last_warned = time.time() elif self.batt_capacity > 0 and self.batt_capacity < BATT_CAPACITY_WARN and self.batt_capacity_warned == False: - str_BattHealth = "Warning, Battery capacity unhealthy: %dmAh" % self.batt_capacity + self.str_BattHealth = "Warning, Battery capacity unhealthy: %dmAh" % self.batt_capacity self.batt_capacity_warned = True self.batt_last_warned = time.time() - if str_BattHealth is not None: - logger.log(str_BattHealth) - packet = struct.pack('