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 {
|
||||
interactions: Interaction[];
|
||||
interactionDevices: Map<string, number>;
|
||||
mode: pond.BinMode.BIN_MODE_DRYING | pond.BinMode.BIN_MODE_HYDRATING;
|
||||
mode: pond.BinMode;
|
||||
plenums?: Plenum[];
|
||||
ambients?: Ambient[];
|
||||
heaters?: Controller[];
|
||||
|
|
@ -94,10 +94,21 @@ export default function BinConditioningCard(props: Props) {
|
|||
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 (
|
||||
<Card raised className={classes.card}>
|
||||
<Typography style={{ fontWeight: 650 }}>
|
||||
{mode === pond.BinMode.BIN_MODE_DRYING ? "Drying" : "Hydrating"} Conditions
|
||||
{modeDisplay()} Conditions
|
||||
</Typography>
|
||||
{conditionsDisplay()}
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ const useStyles = makeStyles((theme: Theme) => {
|
|||
sliderThumb: {
|
||||
height: 15,
|
||||
width: 15,
|
||||
marginTop: -6,
|
||||
marginLeft: -7.5,
|
||||
backgroundColor: "yellow"
|
||||
},
|
||||
sliderTrack: {
|
||||
|
|
@ -60,10 +58,10 @@ const useStyles = makeStyles((theme: Theme) => {
|
|||
backgroundColor: "white"
|
||||
},
|
||||
sliderValLabel: {
|
||||
left: "calc(-50%)",
|
||||
top: 22,
|
||||
"& *": {
|
||||
left: -20,
|
||||
top: 40,
|
||||
background: "transparent",
|
||||
"& *": {
|
||||
color: "#fff"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -223,13 +223,11 @@ export default function BinStorageConditions(props: Props) {
|
|||
}
|
||||
}
|
||||
});
|
||||
console.log(nodeEMCs)
|
||||
cableEMCAvgs.push(avg(nodeEMCs));
|
||||
}
|
||||
cableTempAvgs.push(avg(nodeTemps));
|
||||
}
|
||||
});
|
||||
console.log(cableEMCAvgs)
|
||||
if (cableTempAvgs.length > 0) {
|
||||
setAverageTemp(avg(cableTempAvgs));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -810,7 +810,8 @@ export default function Bin(props: Props) {
|
|||
</Grid>
|
||||
<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_HYDRATING) && (
|
||||
bin.settings.mode === pond.BinMode.BIN_MODE_HYDRATING ||
|
||||
bin.settings.mode === pond.BinMode.BIN_MODE_COOLDOWN) && (
|
||||
<BinConditioningCard
|
||||
mode={bin.settings.mode}
|
||||
interactions={interactions}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue