Merge branch 'staging_environment' into dev_environment
This commit is contained in:
commit
c92311bef6
5 changed files with 106 additions and 35 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -10953,7 +10953,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/protobuf-ts": {
|
"node_modules/protobuf-ts": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#e476940999616206e9f2fa5cec3ac6807b18cd2d",
|
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#80ad2f8b81afe9e04f10f9b52a8250e6824d2b41",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"protobufjs": "^6.8.8"
|
"protobufjs": "^6.8.8"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,8 @@ export default function BinSettings(props: Props) {
|
||||||
const [inMoistureString, setInMoistureString] = useState("0");
|
const [inMoistureString, setInMoistureString] = useState("0");
|
||||||
const [tMoistureString, setTMoistureString] = useState("0");
|
const [tMoistureString, setTMoistureString] = useState("0");
|
||||||
const [moistureTargetDeviation, setMoistureTargetDeviation] = useState("0");
|
const [moistureTargetDeviation, setMoistureTargetDeviation] = useState("0");
|
||||||
const [autoFillThreshold, setAutoFillThreshold] = useState(0);
|
const [autoFillThreshold, setAutoFillThreshold] = useState(5);
|
||||||
|
const [lidarDropDistance, setLidarDropDistance] = useState(0);
|
||||||
const [validInitial, setValidInitial] = useState(true);
|
const [validInitial, setValidInitial] = useState(true);
|
||||||
const [validTarget, setValidTarget] = useState(true);
|
const [validTarget, setValidTarget] = useState(true);
|
||||||
const [validDeviation, setValidDeviation] = useState(true);
|
const [validDeviation, setValidDeviation] = useState(true);
|
||||||
|
|
@ -217,7 +218,7 @@ export default function BinSettings(props: Props) {
|
||||||
: {
|
: {
|
||||||
...{
|
...{
|
||||||
specs: pond.BinSpecs.create({ shape: pond.BinShape.BIN_SHAPE_FLAT_BOTTOM }),
|
specs: pond.BinSpecs.create({ shape: pond.BinShape.BIN_SHAPE_FLAT_BOTTOM }),
|
||||||
inventory: pond.BinInventory.create({ grainBushels: 0, targetTemperature: 15 }),
|
inventory: pond.BinInventory.create({ grainBushels: 0, targetTemperature: 15, autoThreshold: 5 }),
|
||||||
highTemp: 20,
|
highTemp: 20,
|
||||||
lowTemp: 10
|
lowTemp: 10
|
||||||
}
|
}
|
||||||
|
|
@ -315,7 +316,12 @@ export default function BinSettings(props: Props) {
|
||||||
setInMoistureString(initForm.inventory?.initialMoisture.toString() ?? "0");
|
setInMoistureString(initForm.inventory?.initialMoisture.toString() ?? "0");
|
||||||
setTMoistureString(initForm.inventory?.targetMoisture.toString() ?? "0");
|
setTMoistureString(initForm.inventory?.targetMoisture.toString() ?? "0");
|
||||||
setMoistureTargetDeviation(initForm.inventory?.moistureTargetDeviation.toString() ?? "0");
|
setMoistureTargetDeviation(initForm.inventory?.moistureTargetDeviation.toString() ?? "0");
|
||||||
setAutoFillThreshold(initForm.inventory?.autoThreshold ?? 0)
|
setAutoFillThreshold(initForm.inventory?.autoThreshold ?? 5)
|
||||||
|
let dropDistance = initForm.inventory?.lidarDropCm ?? 0
|
||||||
|
if(getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET){
|
||||||
|
dropDistance = Math.round((dropDistance/30.48)*100)/100
|
||||||
|
}
|
||||||
|
setLidarDropDistance(dropDistance)
|
||||||
setActiveStep(0);
|
setActiveStep(0);
|
||||||
if (bin) {
|
if (bin) {
|
||||||
setAutoTopNode(bin.settings.autoGrainNode);
|
setAutoTopNode(bin.settings.autoGrainNode);
|
||||||
|
|
@ -437,6 +443,7 @@ export default function BinSettings(props: Props) {
|
||||||
if (form.inventory) {
|
if (form.inventory) {
|
||||||
form.inventory.inventoryControl = inventoryControl
|
form.inventory.inventoryControl = inventoryControl
|
||||||
form.inventory.autoThreshold = autoFillThreshold
|
form.inventory.autoThreshold = autoFillThreshold
|
||||||
|
form.inventory.lidarDropCm = getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? lidarDropDistance * 30.48 : lidarDropDistance
|
||||||
}
|
}
|
||||||
|
|
||||||
binAPI
|
binAPI
|
||||||
|
|
@ -484,6 +491,8 @@ export default function BinSettings(props: Props) {
|
||||||
if (form.inventory) {
|
if (form.inventory) {
|
||||||
form.inventory.inventoryControl = inventoryControl
|
form.inventory.inventoryControl = inventoryControl
|
||||||
form.inventory.autoThreshold = autoFillThreshold
|
form.inventory.autoThreshold = autoFillThreshold
|
||||||
|
//if the users preferences are in feet convert the distance to cm otherwise it was entered as cm so use that
|
||||||
|
form.inventory.lidarDropCm = getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? lidarDropDistance * 30.48 : lidarDropDistance
|
||||||
}
|
}
|
||||||
console.log(form)
|
console.log(form)
|
||||||
binAPI
|
binAPI
|
||||||
|
|
@ -947,6 +956,25 @@ export default function BinSettings(props: Props) {
|
||||||
setAutoFillThreshold(+e.target.value)
|
setAutoFillThreshold(+e.target.value)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<TextField
|
||||||
|
sx={{marginTop: 4}}
|
||||||
|
fullWidth
|
||||||
|
variant="outlined"
|
||||||
|
label="Drop Distance"
|
||||||
|
helperText="The distance between the lidar and the peak"
|
||||||
|
type="number"
|
||||||
|
InputProps={{
|
||||||
|
endAdornment: (
|
||||||
|
<InputAdornment position="end">
|
||||||
|
{getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "ft" : "cm"}
|
||||||
|
</InputAdornment>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
value={lidarDropDistance}
|
||||||
|
onChange={e => {
|
||||||
|
setLidarDropDistance(+e.target.value)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
{inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_LIBRACART &&
|
{inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_LIBRACART &&
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
[
|
[
|
||||||
pond.Grain.GRAIN_CORN,
|
pond.Grain.GRAIN_CORN,
|
||||||
{
|
{
|
||||||
name: "Corn",
|
name: "Corn (Henderson)",
|
||||||
group: "Corn",
|
group: "Corn",
|
||||||
equation: Equation.henderson,
|
equation: Equation.henderson,
|
||||||
a: 0.000066612,
|
a: 0.000066612,
|
||||||
|
|
@ -153,6 +153,40 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
bushelsPerTonne: 39.368
|
bushelsPerTonne: 39.368
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
pond.Grain.GRAIN_CORN_B,
|
||||||
|
{
|
||||||
|
name: "Corn (Chung-Pfost)",
|
||||||
|
group: "Corn",
|
||||||
|
equation: Equation.chungPfost,
|
||||||
|
a: 374.34,
|
||||||
|
b: 0.18662,
|
||||||
|
c: 31.696,
|
||||||
|
setTempC: 38.0,
|
||||||
|
targetMC: 15.6,
|
||||||
|
img: CornImg,
|
||||||
|
colour: "#ffef62",
|
||||||
|
weightConversionKg: 25.4014333665971,
|
||||||
|
bushelsPerTonne: 39.368
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
pond.Grain.GRAIN_CORN_C,
|
||||||
|
{
|
||||||
|
name: "Corn (Oswin)",
|
||||||
|
group: "Corn",
|
||||||
|
equation: Equation.oswin,
|
||||||
|
a: 15.303,
|
||||||
|
b: -0.10164,
|
||||||
|
c: 3.0358,
|
||||||
|
setTempC: 38.0,
|
||||||
|
targetMC: 15.6,
|
||||||
|
img: CornImg,
|
||||||
|
colour: "#ffef62",
|
||||||
|
weightConversionKg: 25.4014333665971,
|
||||||
|
bushelsPerTonne: 39.368
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
pond.Grain.GRAIN_MAIZE_WHITE,
|
pond.Grain.GRAIN_MAIZE_WHITE,
|
||||||
{
|
{
|
||||||
|
|
@ -190,7 +224,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
[
|
[
|
||||||
pond.Grain.GRAIN_OATS,
|
pond.Grain.GRAIN_OATS,
|
||||||
{
|
{
|
||||||
name: "Oats a",
|
name: "Oats (Henderson)",
|
||||||
group: "Oats",
|
group: "Oats",
|
||||||
equation: Equation.henderson,
|
equation: Equation.henderson,
|
||||||
a: 0.000085511,
|
a: 0.000085511,
|
||||||
|
|
@ -207,7 +241,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
[
|
[
|
||||||
pond.Grain.GRAIN_OATS_B,
|
pond.Grain.GRAIN_OATS_B,
|
||||||
{
|
{
|
||||||
name: "Oats b",
|
name: "Oats (Chung-Pfost)",
|
||||||
group: "Oats",
|
group: "Oats",
|
||||||
equation: Equation.chungPfost,
|
equation: Equation.chungPfost,
|
||||||
a: 442.85,
|
a: 442.85,
|
||||||
|
|
@ -224,7 +258,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
[
|
[
|
||||||
pond.Grain.GRAIN_OATS_C,
|
pond.Grain.GRAIN_OATS_C,
|
||||||
{
|
{
|
||||||
name: "Oats c",
|
name: "Oats (Oswin)",
|
||||||
group: "Oats",
|
group: "Oats",
|
||||||
equation: Equation.oswin,
|
equation: Equation.oswin,
|
||||||
a: 12.412,
|
a: 12.412,
|
||||||
|
|
@ -543,7 +577,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
],[
|
],[
|
||||||
pond.Grain.GRAIN_RYE_A,
|
pond.Grain.GRAIN_RYE_A,
|
||||||
{
|
{
|
||||||
name: "Rye a",
|
name: "Rye (Henderson)",
|
||||||
group: "Rye",
|
group: "Rye",
|
||||||
equation: Equation.henderson,
|
equation: Equation.henderson,
|
||||||
a: 0.00006343,
|
a: 0.00006343,
|
||||||
|
|
@ -558,7 +592,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
],[
|
],[
|
||||||
pond.Grain.GRAIN_RYE_B,
|
pond.Grain.GRAIN_RYE_B,
|
||||||
{
|
{
|
||||||
name: "Rye b",
|
name: "Rye (Chung-Pfost)",
|
||||||
group: "Rye",
|
group: "Rye",
|
||||||
equation: Equation.chungPfost,
|
equation: Equation.chungPfost,
|
||||||
a: 461.0230,
|
a: 461.0230,
|
||||||
|
|
@ -573,7 +607,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
],[
|
],[
|
||||||
pond.Grain.GRAIN_RYE_C,
|
pond.Grain.GRAIN_RYE_C,
|
||||||
{
|
{
|
||||||
name: "Rye c",
|
name: "Rye (Halsey)",
|
||||||
group: "Rye",
|
group: "Rye",
|
||||||
equation: Equation.halsey,
|
equation: Equation.halsey,
|
||||||
a: 4.2970,
|
a: 4.2970,
|
||||||
|
|
@ -588,7 +622,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
|
||||||
],[
|
],[
|
||||||
pond.Grain.GRAIN_RYE_D,
|
pond.Grain.GRAIN_RYE_D,
|
||||||
{
|
{
|
||||||
name: "Rye d",
|
name: "Rye (Oswin)",
|
||||||
group: "Rye",
|
group: "Rye",
|
||||||
equation: Equation.oswin,
|
equation: Equation.oswin,
|
||||||
a: 11.8870,
|
a: 11.8870,
|
||||||
|
|
|
||||||
|
|
@ -957,29 +957,16 @@ export default function InteractionSettings(props: Props) {
|
||||||
</TextField>
|
</TextField>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid size={{ xs: 2, sm: 1 }}>
|
<Grid size={{ xs: 2, sm: 1 }}>
|
||||||
{index === 0 ? (
|
|
||||||
<Tooltip title="Add another condition">
|
|
||||||
<IconButton
|
|
||||||
color="primary"
|
|
||||||
disabled={numConditions > 1 || !canEdit}
|
|
||||||
aria-label="Add another condition"
|
|
||||||
onClick={addCondition}
|
|
||||||
className={classNames(classes.greenButton, classes.noPadding)}>
|
|
||||||
<AddIcon />
|
|
||||||
</IconButton>
|
|
||||||
</Tooltip>
|
|
||||||
) : (
|
|
||||||
<Tooltip title="Remove this condition">
|
<Tooltip title="Remove this condition">
|
||||||
<IconButton
|
<IconButton
|
||||||
color="default"
|
color="default"
|
||||||
disabled={!canEdit}
|
disabled={numConditions === 1 ||!canEdit}
|
||||||
aria-label="Remove condition"
|
aria-label="Remove condition"
|
||||||
onClick={() => removeCondition(index)}
|
onClick={() => removeCondition(index)}
|
||||||
className={classNames(classes.redButton, classes.noPadding)}>
|
className={classNames(classes.redButton, classes.noPadding)}>
|
||||||
<RemoveIcon />
|
<RemoveIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
{multiNodeSource() && !sensor && (
|
{multiNodeSource() && !sensor && (
|
||||||
|
|
@ -1076,6 +1063,16 @@ export default function InteractionSettings(props: Props) {
|
||||||
) : (
|
) : (
|
||||||
<FormHelperText>You must select a source before adding conditions</FormHelperText>
|
<FormHelperText>You must select a source before adding conditions</FormHelperText>
|
||||||
)}
|
)}
|
||||||
|
<Tooltip title="Add another condition">
|
||||||
|
<IconButton
|
||||||
|
color="primary"
|
||||||
|
disabled={numConditions >= device.maxConditions() || !canEdit}
|
||||||
|
aria-label="Add another condition"
|
||||||
|
onClick={addCondition}
|
||||||
|
className={classNames(classes.greenButton, classes.noPadding)}>
|
||||||
|
<AddIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,18 @@ export class Device {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public maxConditions(): number {
|
||||||
|
let max = 2
|
||||||
|
switch (this.settings.platform) {
|
||||||
|
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLACK:
|
||||||
|
case pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE:
|
||||||
|
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE:
|
||||||
|
case pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE:
|
||||||
|
max = this.status.firmwareVersion >= "2.1.9" ? 4 : 2;
|
||||||
|
}
|
||||||
|
return max
|
||||||
|
}
|
||||||
|
|
||||||
public featureSupported(feature: string): boolean {
|
public featureSupported(feature: string): boolean {
|
||||||
let versions = featureVersions.get(feature);
|
let versions = featureVersions.get(feature);
|
||||||
if (!versions) {
|
if (!versions) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue