From 797fef3ed402af9e2a9143b1dbf5ce94942455de Mon Sep 17 00:00:00 2001 From: K-J-Dod24 Date: Wed, 10 May 2023 11:19:20 +0100 Subject: io32 coolant temperature fix --- modern/src/common/attributes/usePositionAttributes.js | 10 ++++++++++ modern/src/common/components/PositionValue.js | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'modern/src/common') diff --git a/modern/src/common/attributes/usePositionAttributes.js b/modern/src/common/attributes/usePositionAttributes.js index a2fab896..90b14e76 100644 --- a/modern/src/common/attributes/usePositionAttributes.js +++ b/modern/src/common/attributes/usePositionAttributes.js @@ -196,6 +196,16 @@ export default (t) => useMemo(() => ({ name: `${t('positionOutput')} 4`, type: 'boolean', }, + coolantTemp: { + name: t('positionCoolantTemp'), + type: 'number', + dataType: 'celsius', + }, + engineTemp: { + name: t('positionEngineTemp'), + type: 'number', + dataType: 'celsius', + }, power: { name: t('positionPower'), type: 'number', diff --git a/modern/src/common/components/PositionValue.js b/modern/src/common/components/PositionValue.js index 2f996960..56114ed3 100644 --- a/modern/src/common/components/PositionValue.js +++ b/modern/src/common/components/PositionValue.js @@ -45,6 +45,10 @@ const PositionValue = ({ position, property, attribute }) => { return formatAltitude(value, altitudeUnit, t); case 'batteryLevel': return value != null ? formatPercentage(value, t) : ''; + case 'coolantTemp': + return formatCelsius(value); + case 'engineTemp': + return formatCelsius(value); case 'alarm': return formatAlarm(value, t); case 'odometer': -- cgit v1.2.3