Automatic PROD MODE + changes Q conso location

This commit is contained in:
Etienne Chassaing 2025-08-20 14:58:54 +02:00
parent cae91b5f05
commit 18c34a3334
2 changed files with 6 additions and 1 deletions

View File

@ -81,7 +81,7 @@ def format_PU_data(data):
"timestamp": datetime.datetime.now().isoformat(), "timestamp": datetime.datetime.now().isoformat(),
"Qperm": np.round(data.get("FM2", 0.0), 1), "Qperm": np.round(data.get("FM2", 0.0), 1),
"Qdilute": np.round(data.get("FM1", 0.0), 1), "Qdilute": np.round(data.get("FM1", 0.0), 1),
"Qdrain": np.round(data.get("FM4", 0.0), 1), "Qdrain": max(np.round(data.get("FM4", 0.0), 1),350.0),
"Qrecirc": np.round(data.get("FM3", 0.0), 1), "Qrecirc": np.round(data.get("FM3", 0.0), 1),
"QdrainEDI": np.round(data.get("FM2", 0.0), 1) - np.round(data.get("FM1", 0.0), 1), "QdrainEDI": np.round(data.get("FM2", 0.0), 1) - np.round(data.get("FM1", 0.0), 1),
"Pro": np.round(data.get("PS2", 0.0), 2), "Pro": np.round(data.get("PS2", 0.0), 2),

View File

@ -171,6 +171,11 @@ async function updateAllPlots() {
); );
} }
if (plot.id === 'Qperm-plot') {
const qConso = DSData["Qconso"];
const baseIndex = puList.length + (plot.refKey ? 1 : 0);
Plotly.extendTraces(plot.id, { x: [[timestamp]], y: [[qConso ?? null]] }, [baseIndex + 1], maxPoints);
}
// Extend QSkid + Qconso for Qperm // Extend QSkid + Qconso for Qperm
if (plot.id === 'Qdrain-plot') { if (plot.id === 'Qdrain-plot') {
const qSkid = SkidData["QSkid"]; const qSkid = SkidData["QSkid"];