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

This commit is contained in:
csawatzky 2025-12-30 13:19:40 -06:00
parent 4911fa56d0
commit c7d1f7ef9b
2 changed files with 6 additions and 5 deletions

View file

@ -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 (
<CardHeader
avatar={
@ -260,9 +263,7 @@ export default function GateGraphs(props: Props) {
subheader={
<UnitMeasurementSummary
component={comp}
reading={UnitMeasurement.convertLastMeasurement(
comp.status.measurement.map(um => UnitMeasurement.create(um, user)) ?? []
)}
reading={UnitMeasurement.convertLastMeasurement(umArray)}
/>
}
/>