Merge branch 'reverse_nodes' into dev_environment, also increased the one wire scan feature to 2.1.9
This commit is contained in:
commit
19aefc8774
4 changed files with 70 additions and 9 deletions
|
|
@ -2222,11 +2222,13 @@ export default function BinSettings(props: Props) {
|
|||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
{!isCustomInventory && (
|
||||
<Box marginTop={1}>
|
||||
<Typography variant="body1" align="center" gutterBottom>
|
||||
Moisture
|
||||
</Typography>
|
||||
{isCustomInventory && (
|
||||
<Typography variant="caption">You are using a custom Grain type, the drying estimate may not be accurate</Typography>
|
||||
)}
|
||||
<Box marginTop={1}>
|
||||
<TextField
|
||||
label="Target EMC"
|
||||
|
|
@ -2318,7 +2320,7 @@ export default function BinSettings(props: Props) {
|
|||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export default function ComponentForm(props: Props) {
|
|||
length: "0",
|
||||
height: "0",
|
||||
width: "0",
|
||||
sensorDistance: "0"
|
||||
sensorDistance: "0",
|
||||
});
|
||||
const [compMode, setCompMode] = useState<any>();
|
||||
//const [numCalibrations, setNumCalibrations] = useState(0)
|
||||
|
|
@ -204,7 +204,7 @@ export default function ComponentForm(props: Props) {
|
|||
length: length.toFixed(2),
|
||||
width: width.toFixed(2),
|
||||
height: height.toFixed(2),
|
||||
sensorDistance: sensorDistance.toFixed(2)
|
||||
sensorDistance: sensorDistance.toFixed(2),
|
||||
});
|
||||
}, [component]);
|
||||
|
||||
|
|
@ -377,6 +377,12 @@ export default function ComponentForm(props: Props) {
|
|||
setForm(f);
|
||||
};
|
||||
|
||||
const toggleReverseNodes = (event: any) => {
|
||||
let f = cloneDeep(form);
|
||||
f.component.settings.reverseNodes = event.target.checked;
|
||||
setForm(f);
|
||||
};
|
||||
|
||||
const updateGrainType = (option: Option | null) => {
|
||||
let f = cloneDeep(form);
|
||||
|
||||
|
|
@ -908,6 +914,42 @@ export default function ComponentForm(props: Props) {
|
|||
);
|
||||
};
|
||||
|
||||
const reverseCheck = () => {
|
||||
const {reverseNodes} = form.component.settings
|
||||
let ext = extension(component.type(), component.subType())
|
||||
|
||||
if (ext.isArray && device.featureSupported("reverseNodes")) {
|
||||
return (
|
||||
<Grid
|
||||
container
|
||||
direction="row"
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
alignContent="center"
|
||||
spacing={1}>
|
||||
<Grid container size={{ xs: 4, sm: 3 }} justifyContent="center">
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
checked={reverseNodes}
|
||||
onChange={toggleReverseNodes}
|
||||
name="nodesReversed"
|
||||
aria-label="nodesReversed"
|
||||
color="secondary"
|
||||
/>
|
||||
}
|
||||
label={<Typography variant="caption">Reverse Nodes</Typography>}
|
||||
labelPlacement="top"
|
||||
className={classes.switchControl}
|
||||
disabled={!canEdit}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const generalForm = () => {
|
||||
const {
|
||||
component,
|
||||
|
|
@ -975,6 +1017,7 @@ export default function ComponentForm(props: Props) {
|
|||
)}
|
||||
{component.settings.type === quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE &&
|
||||
grainSelect()}
|
||||
{reverseCheck()}
|
||||
{component.settings.type === quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE && (
|
||||
<Grid
|
||||
container
|
||||
|
|
|
|||
|
|
@ -34,6 +34,22 @@ const featureVersions: Map<string, FeatureVersionByPlatform> = new Map([
|
|||
v2EthBlue: "2.0.44"
|
||||
}
|
||||
],[
|
||||
"reverseNodes",
|
||||
{
|
||||
photon: "N/A",
|
||||
electron: "N/A",
|
||||
v2Wifi: "N/A",
|
||||
v2Cell: "N/A",
|
||||
v2WifiS3: "N/A",
|
||||
v2CellS3: "N/A",
|
||||
v2CellBlack: "2.1.8",
|
||||
v2CellGreen: "N/A",
|
||||
v2WifiBlue: "2.1.8",
|
||||
v2CellBlue: "2.1.8",
|
||||
v2EthBlue: "2.1.8"
|
||||
}
|
||||
],
|
||||
[
|
||||
"detectI2C",
|
||||
{
|
||||
photon: "N/A",
|
||||
|
|
@ -57,11 +73,11 @@ const featureVersions: Map<string, FeatureVersionByPlatform> = new Map([
|
|||
v2Cell: "N/A",
|
||||
v2WifiS3: "N/A",
|
||||
v2CellS3: "N/A",
|
||||
v2CellBlack: "2.1.8",
|
||||
v2CellBlack: "2.1.9",
|
||||
v2CellGreen: "N/A",
|
||||
v2WifiBlue: "2.1.8",
|
||||
v2CellBlue: "2.1.8",
|
||||
v2EthBlue: "2.1.8"
|
||||
v2WifiBlue: "2.1.9",
|
||||
v2CellBlue: "2.1.9",
|
||||
v2EthBlue: "2.1.9"
|
||||
}
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue