with changing unit preferences and such to use the user object and not local storage, the decriber needed to be updated as well and i missed that part, so now describeMeasurement takes in an optional user and uses its settings for the unit and such and when not passed in will use the defaults

This commit is contained in:
csawatzky 2026-04-01 10:42:16 -06:00
parent 9d41499c27
commit 52c8a02af3
18 changed files with 117 additions and 56 deletions

View file

@ -87,9 +87,24 @@ export default function GrainNodeInteractions(props: Props) {
const [nodeHum, setNodeHum] = useState<number>();
const [nodeMoist, setNodeMoist] = useState<number | undefined>();
const [{ user, as }] = useGlobalState();
const tempDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE);
const humDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_PERCENT);
const moistureDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_GRAIN_EMC);
const tempDescriber = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE,
quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE,
undefined,
undefined,
user);
const humDescriber = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PERCENT,
quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE,
undefined,
undefined,
user);
const moistureDescriber = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_GRAIN_EMC,
quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE,
undefined,
undefined,
user);
const [topNode, setTopNode] = useState(false);
const [excluded, setExcluded] = useState(false);
const componentAPI = useComponentAPI();