displaying the conditioning card in cooldown now as well as drying/hydrating
This commit is contained in:
parent
239f1d4327
commit
80428050ba
4 changed files with 18 additions and 10 deletions
|
|
@ -33,7 +33,7 @@ const useStyles = makeStyles((theme: Theme) => {
|
||||||
interface Props {
|
interface Props {
|
||||||
interactions: Interaction[];
|
interactions: Interaction[];
|
||||||
interactionDevices: Map<string, number>;
|
interactionDevices: Map<string, number>;
|
||||||
mode: pond.BinMode.BIN_MODE_DRYING | pond.BinMode.BIN_MODE_HYDRATING;
|
mode: pond.BinMode;
|
||||||
plenums?: Plenum[];
|
plenums?: Plenum[];
|
||||||
ambients?: Ambient[];
|
ambients?: Ambient[];
|
||||||
heaters?: Controller[];
|
heaters?: Controller[];
|
||||||
|
|
@ -94,10 +94,21 @@ export default function BinConditioningCard(props: Props) {
|
||||||
return conditioningInteractions;
|
return conditioningInteractions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const modeDisplay = () => {
|
||||||
|
switch(mode){
|
||||||
|
case pond.BinMode.BIN_MODE_DRYING:
|
||||||
|
return "Drying"
|
||||||
|
case pond.BinMode.BIN_MODE_HYDRATING:
|
||||||
|
return "Hydrating"
|
||||||
|
case pond.BinMode.BIN_MODE_COOLDOWN:
|
||||||
|
return "Cooldown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card raised className={classes.card}>
|
<Card raised className={classes.card}>
|
||||||
<Typography style={{ fontWeight: 650 }}>
|
<Typography style={{ fontWeight: 650 }}>
|
||||||
{mode === pond.BinMode.BIN_MODE_DRYING ? "Drying" : "Hydrating"} Conditions
|
{modeDisplay()} Conditions
|
||||||
</Typography>
|
</Typography>
|
||||||
{conditionsDisplay()}
|
{conditionsDisplay()}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ const useStyles = makeStyles((theme: Theme) => {
|
||||||
sliderThumb: {
|
sliderThumb: {
|
||||||
height: 15,
|
height: 15,
|
||||||
width: 15,
|
width: 15,
|
||||||
marginTop: -6,
|
|
||||||
marginLeft: -7.5,
|
|
||||||
backgroundColor: "yellow"
|
backgroundColor: "yellow"
|
||||||
},
|
},
|
||||||
sliderTrack: {
|
sliderTrack: {
|
||||||
|
|
@ -60,10 +58,10 @@ const useStyles = makeStyles((theme: Theme) => {
|
||||||
backgroundColor: "white"
|
backgroundColor: "white"
|
||||||
},
|
},
|
||||||
sliderValLabel: {
|
sliderValLabel: {
|
||||||
left: "calc(-50%)",
|
left: -20,
|
||||||
top: 22,
|
top: 40,
|
||||||
|
background: "transparent",
|
||||||
"& *": {
|
"& *": {
|
||||||
background: "transparent",
|
|
||||||
color: "#fff"
|
color: "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -223,13 +223,11 @@ export default function BinStorageConditions(props: Props) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(nodeEMCs)
|
|
||||||
cableEMCAvgs.push(avg(nodeEMCs));
|
cableEMCAvgs.push(avg(nodeEMCs));
|
||||||
}
|
}
|
||||||
cableTempAvgs.push(avg(nodeTemps));
|
cableTempAvgs.push(avg(nodeTemps));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(cableEMCAvgs)
|
|
||||||
if (cableTempAvgs.length > 0) {
|
if (cableTempAvgs.length > 0) {
|
||||||
setAverageTemp(avg(cableTempAvgs));
|
setAverageTemp(avg(cableTempAvgs));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -810,7 +810,8 @@ export default function Bin(props: Props) {
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid size={{ xs: 12, sm: 12, md: 12, lg: 2.6 }}>
|
<Grid size={{ xs: 12, sm: 12, md: 12, lg: 2.6 }}>
|
||||||
{(bin.settings.mode === pond.BinMode.BIN_MODE_DRYING ||
|
{(bin.settings.mode === pond.BinMode.BIN_MODE_DRYING ||
|
||||||
bin.settings.mode === pond.BinMode.BIN_MODE_HYDRATING) && (
|
bin.settings.mode === pond.BinMode.BIN_MODE_HYDRATING ||
|
||||||
|
bin.settings.mode === pond.BinMode.BIN_MODE_COOLDOWN) && (
|
||||||
<BinConditioningCard
|
<BinConditioningCard
|
||||||
mode={bin.settings.mode}
|
mode={bin.settings.mode}
|
||||||
interactions={interactions}
|
interactions={interactions}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue