updated the gate page to use the pca state in the gates status for the lights on the visualizer and the pca fan on/off, this also allows me to get rid of setting those base on the data loaded for the graph which will fix the bug where the light could change based on what date range you loaded

This commit is contained in:
csawatzky 2026-01-28 14:59:32 -06:00
parent f02aa3a6e0
commit e42f1a3fb0
5 changed files with 52 additions and 42 deletions

View file

@ -39,7 +39,7 @@ interface Props {
tempChain: string;
redKey: string;
greenKey: string;
setPCAState: (state: boolean) => void;
// setPCAState: (state: boolean) => void;
}
const useStyles = makeStyles((theme: Theme) => ({
@ -63,7 +63,7 @@ const useStyles = makeStyles((theme: Theme) => ({
);
export default function GateGraphs(props: Props) {
const { gate, display, compMap, device, pressure, ambient, tempChain, greenKey, redKey, setPCAState } = props;
const { gate, display, compMap, device, pressure, ambient, tempChain, greenKey, redKey } = props;
const [{ as }] = useGlobalState();
const [xDomain, setXDomain] = useState<string[] | number[]>(["dataMin", "dataMax"]);
const [zoomed, setZoomed] = useState(false);
@ -347,9 +347,9 @@ export default function GateGraphs(props: Props) {
gate={gate}
ambient={ambient}
pressureComponent={pressure}
setPCAState={(state: boolean) => {
setPCAState(state);
}}
// setPCAState={(state: boolean) => {
// setPCAState(state);
// }}
multiGraphZoom={domain => {
setXDomain(domain);
setZoomed(true);