From 260f77a2a8f4921c0c283c00082506486334fd40 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 10 Nov 2024 01:46:29 +0100 Subject: [PATCH] succd: Add highlight colors for temperatures Highlight out-of-range temperatures for the user. The limits are currently by intuition and should be reconsidered. --- succbone/succd/index.html | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/succbone/succd/index.html b/succbone/succd/index.html index d700e1e..def9ac9 100644 --- a/succbone/succd/index.html +++ b/succbone/succd/index.html @@ -417,10 +417,28 @@ window.addEventListener("load", (_) => { } tempSEM.innerHTML = data.Temperatures.SEM + " °C"; - tempDPBottom.innerHTML = data.Temperatures.DPBottom + " °C"; - tempDPTop.innerHTML = data.Temperatures.DPTop + " °C"; - tempDPInlet.innerHTML = data.Temperatures.DPInlet + " °C"; + tempSEM.style = (data.Temperatures.SEM > 30) ? + colors.highlightCaution : colors.default; humiditySEM.innerHTML = data.Humidity.SEM + " %"; + humiditySEM.style = (data.Humidity.SEM > 59) ? + colors.highlightCaution : colors.default; + + tempDPTop.innerHTML = data.Temperatures.DPTop + " °C"; + tempDPTop.style = (data.Temperatures.DPTop > 30) ? + colors.highlightCaution : colors.default; + + tempDPInlet.innerHTML = data.Temperatures.DPInlet + " °C"; + tempDPInlet.style = (data.Temperatures.DPInlet > 30) ? + colors.highlightCaution : colors.default; + + tempDPBottom.innerHTML = data.Temperatures.DPBottom + " °C"; + if (data.Temperatures.DPBottom > 200) { + tempDPBottom.style = colors.highlightFault; + } else if (data.Temperatures.DPBottom > 50) { + tempDPBottom.style = colors.highlightNeutral; + } else { + tempDPBottom.style = colors.default; + } let t = []; if (data.Feedback.RoughReached) {