From 4ee303f854a471c32af294a5355a9574cf2bb1be Mon Sep 17 00:00:00 2001 From: Etienne Chassaing <60154720+cetiennec@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:22:54 +0200 Subject: [PATCH] Switch pump to Qdrain_sp --- classCAN.py | 2 +- main.py | 2 +- static/monitor_PU.html | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/classCAN.py b/classCAN.py index 550efc2..26f76fc 100644 --- a/classCAN.py +++ b/classCAN.py @@ -170,7 +170,7 @@ class CANBackend: "MV06_sp": int.from_bytes(data[0:2], 'little') / 100.0, "MV07_sp": int.from_bytes(data[2:4], 'little') / 100.0, "MV08_sp": int.from_bytes(data[4:6], 'little') / 100.0, - "Pump_sp": int.from_bytes(data[6:8], 'little') / 100.0, + "Qdrain_sp": int.from_bytes(data[6:8], 'little') / 100.0, }) elif cob_id == 0x2B1 and len(data) >= 7: diff --git a/main.py b/main.py index b90595f..aa95eb8 100644 --- a/main.py +++ b/main.py @@ -100,7 +100,7 @@ def format_PU_data(data): "MV07_sp": np.round(data.get("MV07_sp", 0.0), 1), "MV08": np.round(data.get("MV08", 0.0), 1), "MV08_sp": np.round(data.get("MV08_sp", 0.0), 1), - "Pump_sp" : np.round(data.get("Pump_sp", 0.0), 1), + "Qdrain_sp" : np.round(data.get("Qdrain_sp", 0.0), 1), } def format_DS_data(data): diff --git a/static/monitor_PU.html b/static/monitor_PU.html index 1edd416..2ced5b4 100644 --- a/static/monitor_PU.html +++ b/static/monitor_PU.html @@ -89,9 +89,9 @@ }, [0, 1], maxPoints); Plotly.extendTraces('flow-plot-2', { - x: [[t], [t], [t], [t], [t]], - y: [[puData.Qdrain], [puData.Qrecirc], [SkidData.QSkid], [puData.QdrainEDI], [DSData.Qconso]] - }, [0, 1, 2, 3, 4], maxPoints); + x: [[t], [t], [t], [t], [t], [t]], + y: [[puData.Qdrain], [puData.Qrecirc], [SkidData.QSkid], [puData.QdrainEDI], [DSData.Qconso], [puData.Qdrain_sp]] + }, [0, 1, 2, 3, 4, 5], maxPoints); Plotly.extendTraces('pressure-plot-1', { x: [[t], [t]], @@ -179,7 +179,7 @@ { x: time0, y: [0], name: 'QSkid', mode: 'lines' }, { x: time0, y: [0], name: 'QdrainEDI', mode: 'lines' }, { x: time0, y: [0], name: 'Qconso', mode: 'lines' }, - + { x: time0, y: [0], name: 'Qdrain_sp', mode: 'lines' }, ], { title: 'Other Flows', xaxis: { type: 'date' }, yaxis: { title: 'Flow (L/h)' } });