updated the grain describers to use the new enum in the pond for the moisture calculation, changed the extract moisture function to account for custom grain types, and if there is no equation set it will return the humidity, updated instances where the bin uses that function to pass in the grain settings in its inventory
This commit is contained in:
parent
bdddcfc103
commit
d6c670fb78
16 changed files with 596 additions and 140 deletions
|
|
@ -1404,6 +1404,7 @@ export default function BinVisualizer(props: Props) {
|
|||
}
|
||||
}}
|
||||
inventoryControl={bin.inventoryControl()}
|
||||
customGrain={bin.customGrain()}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
|
@ -1574,6 +1575,12 @@ export default function BinVisualizer(props: Props) {
|
|||
const fanPerformance = () => {
|
||||
let totalCFM = bin.status.fanCfm;
|
||||
let bushelCFM = bin.status.cfmPerBushel;
|
||||
let emc = ExtractMoisture(
|
||||
bin.grain(),
|
||||
activePlenum?.tempHumidity?.temperature ?? 0,
|
||||
activePlenum?.tempHumidity?.humidity ?? 0,
|
||||
bin.customGrain()
|
||||
)
|
||||
return (
|
||||
<Box>
|
||||
<Typography style={{ fontSize: isMobile ? "0.85rem" : "1.0rem", fontWeight: 650 }}>
|
||||
|
|
@ -1616,20 +1623,18 @@ export default function BinVisualizer(props: Props) {
|
|||
{cfmDryWarning(bushelCFM)}
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid >
|
||||
<Box className={classes.lightBox}>
|
||||
<Typography align="center" style={{ fontWeight: 650, color: emcColour }}>
|
||||
{ExtractMoisture(
|
||||
bin.grain(),
|
||||
activePlenum?.tempHumidity?.temperature ?? 0,
|
||||
activePlenum?.tempHumidity?.humidity ?? 0
|
||||
).toFixed(2)}
|
||||
%
|
||||
</Typography>
|
||||
<Typography align="center" style={{ fontWeight: 650 }}>
|
||||
Plenum EMC
|
||||
</Typography>
|
||||
</Box>
|
||||
<Grid>
|
||||
{emc !== activePlenum?.tempHumidity?.humidity &&
|
||||
<Box className={classes.lightBox}>
|
||||
<Typography align="center" style={{ fontWeight: 650, color: emcColour }}>
|
||||
{emc.toFixed(2)}
|
||||
%
|
||||
</Typography>
|
||||
<Typography align="center" style={{ fontWeight: 650 }}>
|
||||
Plenum EMC
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
|
@ -1638,6 +1643,12 @@ export default function BinVisualizer(props: Props) {
|
|||
};
|
||||
|
||||
const ambientDisplay = () => {
|
||||
let emc = ExtractMoisture(
|
||||
bin.grain(),
|
||||
ambient?.temperature ?? 0,
|
||||
ambient?.humidity ?? 0,
|
||||
bin.customGrain()
|
||||
)
|
||||
return (
|
||||
<Box>
|
||||
<Typography style={{ fontSize: isMobile ? "0.85rem" : "1.0rem", fontWeight: 650 }}>
|
||||
|
|
@ -1677,19 +1688,17 @@ export default function BinVisualizer(props: Props) {
|
|||
</Box>
|
||||
</Grid>
|
||||
<Grid >
|
||||
<Box className={classes.lightBox}>
|
||||
<Typography align="center" style={{ fontWeight: 650, color: emcColour }}>
|
||||
{ExtractMoisture(
|
||||
bin.grain(),
|
||||
ambient?.temperature ?? 0,
|
||||
ambient?.humidity ?? 0
|
||||
).toFixed(2)}
|
||||
%
|
||||
</Typography>
|
||||
<Typography align="center" style={{ fontWeight: 650 }}>
|
||||
Ambient EMC
|
||||
</Typography>
|
||||
</Box>
|
||||
{emc !== ambient?.humidity &&
|
||||
<Box className={classes.lightBox}>
|
||||
<Typography align="center" style={{ fontWeight: 650, color: emcColour }}>
|
||||
{emc.toFixed(2)}
|
||||
%
|
||||
</Typography>
|
||||
<Typography align="center" style={{ fontWeight: 650 }}>
|
||||
Ambient EMC
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue