From c7d1f7ef9b7405d8aae5277d8731e1350a4bd748 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Tue, 30 Dec 2025 13:19:40 -0600 Subject: [PATCH] hotfix: increase the pca fan state to 996 pascal (4iwg) from 250 pascal (1iwg), fixed the bug where the sensors tab woul 'convert' the measurment multiple times based on the number of times you went to the tab --- src/gate/GateDevice.tsx | 2 +- src/gate/GateGraphs.tsx | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gate/GateDevice.tsx b/src/gate/GateDevice.tsx index 9fb414f..f7a8746 100644 --- a/src/gate/GateDevice.tsx +++ b/src/gate/GateDevice.tsx @@ -92,7 +92,7 @@ export default function GateDevice(props: Props) { c.status.measurement[0].values[0] && c.status.measurement[0].values[0].values[1] ) { - setPCAFanOn(c.status.measurement[0].values[0].values[1] > 250); //apx 1 iwg + setPCAFanOn(c.status.measurement[0].values[0].values[1] > 996); //apx 4 iwg } break; default: diff --git a/src/gate/GateGraphs.tsx b/src/gate/GateGraphs.tsx index 911d525..40c47d8 100644 --- a/src/gate/GateGraphs.tsx +++ b/src/gate/GateGraphs.tsx @@ -27,6 +27,7 @@ import React, { useEffect, useState } from "react"; import { avg } from "utils"; import GateFlowGraph from "./GateFlowGraph"; import { makeStyles } from "@mui/styles"; +import { cloneDeep } from "lodash"; interface Props { gate: Gate; @@ -245,7 +246,9 @@ export default function GateGraphs(props: Props) { const graphHeader = (comp: Component) => { const componentIcon = GetComponentIcon(comp.settings.type, comp.settings.subtype, themeType); - + console.log(comp) + let measurement = cloneDeep(comp.status.measurement) + let umArray = measurement.map(um => UnitMeasurement.create(um, user)) return ( UnitMeasurement.create(um, user)) ?? [] - )} + reading={UnitMeasurement.convertLastMeasurement(umArray)} /> } />