fixed issue where the cables on the bin svg swapped due to the sorting algorithm, fixed filter issue that included the node one position above the top node, fixed issue that included temp only nodes in the average humidity and moisture calcs

This commit is contained in:
csawatzky 2025-09-02 11:00:00 -06:00
parent 1b916a34de
commit 661a35b5a8
3 changed files with 17 additions and 12 deletions

View file

@ -386,8 +386,11 @@ export default function BinVisualizer(props: Props) {
//also reverse it so that the node 1 (end of the cable) is in the first position
let filteredNodes = cable.filteredNodes(true)
temps.push(...filteredNodes.temps)
humids.push(...filteredNodes.humids)
emcs.push(...filteredNodes.moistures)
//only push to the humidity values if the cable reads humidities
if(cable.subType() !== quack.GrainCableSubtype.GRAIN_CABLE_SUBTYPE_OPI_TEMP){
humids.push(...filteredNodes.humids)
emcs.push(...filteredNodes.moistures)
}
// let tempClone = cloneDeep(cable.temperatures).reverse();
// let humClone = cloneDeep(cable.humidities).reverse();
// let emcClone = cloneDeep(cable.grainMoistures).reverse();