From c457070351566214dec640e46b572bc41b186179 Mon Sep 17 00:00:00 2001
From: ldam <ldam@passcal.nmt.edu>
Date: Mon, 18 Sep 2023 19:34:14 -0600
Subject: [PATCH] Modify adding value to channel Error/Warning to only 3 values
 -1, 0, 1 to use triColorLines

---
 sohstationviewer/model/reftek_data/log_info.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sohstationviewer/model/reftek_data/log_info.py b/sohstationviewer/model/reftek_data/log_info.py
index 486efcb06..1604d72ad 100644
--- a/sohstationviewer/model/reftek_data/log_info.py
+++ b/sohstationviewer/model/reftek_data/log_info.py
@@ -503,15 +503,13 @@ class LogInfo():
                 self.gps_vers.add(gps_ver)
 
             # ================= ERROR/WARNING =========================
-            elif "ERROR:" in line:
-                # These lines are generated by programs like ref2segy and do
-                # not have any time associated with them so just use whatever
-                # time was last in Time.
-                self.add_chan_info('Error/Warning', soh_epoch, -2, idx)
-            elif any(x in line for x in ["NO VALID DISK", "FAILED"]):
+            elif any(x in line for x in ["ERROR:", "NO VALID DISK", "FAILED"]):
+                # These lines with "ERROR:" are generated by programs like
+                # ref2segy and do not have any time associated with them so
+                # just use whatever time was last in Time.
                 epoch = self.simple_read(line)[1]
                 if epoch:
-                    self.add_chan_info('Error/Warning', epoch, -1, idx)
+                    self.add_chan_info('Error/Warning', epoch, 1, idx)
 
             elif "WARNING" in line:
                 # Warings come in lines with the time from the RT130 and lines
@@ -523,7 +521,7 @@ class LogInfo():
                 else:
                     # Just use whatever time was last in Time.
                     # The 2 means that the dots will be a little different.
-                    self.add_chan_info('Error/Warning', soh_epoch, 1, idx)
+                    self.add_chan_info('Error/Warning', soh_epoch, -1, idx)
 
             elif (all(x in line for x in ["BAD", "MAKER"]) or
                   any(x in line for x in ["ERTFS", "IDE BUSY"])):
-- 
GitLab