diff --git a/src/mobile-app/components/sensor.tsx b/src/mobile-app/components/sensor.tsx index fe010b9..4b8aec1 100644 --- a/src/mobile-app/components/sensor.tsx +++ b/src/mobile-app/components/sensor.tsx @@ -243,7 +243,7 @@ export const SensorComponent: React.FC = ({sensor, manual const displayValue = value !== undefined ? value.toFixed(1) : "--"; return ( -
+
= ({sensor, manual } const className = connected ? css.connectedValues : css.disconnectedValues; return ( -
+
{fragments}
); diff --git a/src/sensors/mock-sensor.ts b/src/sensors/mock-sensor.ts index 830d46b..f7ebb05 100644 --- a/src/sensors/mock-sensor.ts +++ b/src/sensors/mock-sensor.ts @@ -135,16 +135,20 @@ export class MockSensor extends Sensor { } public timeSeriesCapabilities(selectableSensorId: any): ITimeSeriesCapabilities { + selectableSensorId = parseInt(selectableSensorId ?? "0", 10); + const {measurement, units, minValue, maxValue} = selectableSensorId === 0 + ? {measurement: "Force", units: "N", minValue: -50, maxValue: 50} + : {measurement: "Temperature", units: "°C", minValue: -40, maxValue: 125}; const defaultMeasurementPeriod = 50; return { measurementPeriod: defaultMeasurementPeriod, minMeasurementPeriod: 10, defaultMeasurementPeriod, - measurement: "Fake Value", + measurement, valueKey: TimeSeriesDataKey, - units: "N/A", - minValue: -5, - maxValue: 5, + units, + minValue, + maxValue, }; }