Merge branch 'staging_environment' of gitlab.com:brandx/bxt-app into staging_environment
This commit is contained in:
commit
8163cecada
3 changed files with 33 additions and 5 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -10953,7 +10953,7 @@
|
|||
},
|
||||
"node_modules/protobuf-ts": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#31866a5a4ebad3770b82f4687bec2fd4c3b8417e",
|
||||
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#900cb83a502288a8e3115657c064520c3c9ab967",
|
||||
"dependencies": {
|
||||
"protobufjs": "^6.8.8"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
"mui-tel-input": "^7.0.0",
|
||||
"notistack": "^3.0.1",
|
||||
"openweathermap-ts": "^1.2.10",
|
||||
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master",
|
||||
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging",
|
||||
"query-string": "^9.2.1",
|
||||
"react": "^18.3.1",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
|
|
|
|||
|
|
@ -183,7 +183,8 @@ export default function BinSettings(props: Props) {
|
|||
const [inMoistureString, setInMoistureString] = useState("0");
|
||||
const [tMoistureString, setTMoistureString] = 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 [validTarget, setValidTarget] = 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 }),
|
||||
inventory: pond.BinInventory.create({ grainBushels: 0, targetTemperature: 15 }),
|
||||
inventory: pond.BinInventory.create({ grainBushels: 0, targetTemperature: 15, autoThreshold: 5 }),
|
||||
highTemp: 20,
|
||||
lowTemp: 10
|
||||
}
|
||||
|
|
@ -315,7 +316,12 @@ export default function BinSettings(props: Props) {
|
|||
setInMoistureString(initForm.inventory?.initialMoisture.toString() ?? "0");
|
||||
setTMoistureString(initForm.inventory?.targetMoisture.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);
|
||||
if (bin) {
|
||||
setAutoTopNode(bin.settings.autoGrainNode);
|
||||
|
|
@ -437,6 +443,7 @@ export default function BinSettings(props: Props) {
|
|||
if (form.inventory) {
|
||||
form.inventory.inventoryControl = inventoryControl
|
||||
form.inventory.autoThreshold = autoFillThreshold
|
||||
form.inventory.lidarDropCm = getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? lidarDropDistance * 30.48 : lidarDropDistance
|
||||
}
|
||||
|
||||
binAPI
|
||||
|
|
@ -484,6 +491,8 @@ export default function BinSettings(props: Props) {
|
|||
if (form.inventory) {
|
||||
form.inventory.inventoryControl = inventoryControl
|
||||
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)
|
||||
binAPI
|
||||
|
|
@ -947,6 +956,25 @@ export default function BinSettings(props: Props) {
|
|||
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>
|
||||
}
|
||||
{inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_LIBRACART &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue