diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2023-09-23 07:59:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 07:59:20 -0700 |
commit | 603d6c12e0b598685f148c05410e70adc2408e65 (patch) | |
tree | 81f3b6462bb60c4969d3fff4981b3642e6b9adc3 | |
parent | 925c51d94f25021cb4fbf77cee7b0cb7f611692b (diff) | |
parent | 4caa00dfbdd3cd9bef480eb6ba79cfe93b789e57 (diff) | |
download | trackermap-web-603d6c12e0b598685f148c05410e70adc2408e65.tar.gz trackermap-web-603d6c12e0b598685f148c05410e70adc2408e65.tar.bz2 trackermap-web-603d6c12e0b598685f148c05410e70adc2408e65.zip |
Merge pull request #1179 from geduxas/master
OBDSpeed expected as km/h not knots.
-rw-r--r-- | modern/src/common/components/PositionValue.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/common/components/PositionValue.jsx b/modern/src/common/components/PositionValue.jsx index 58841939..64f9dc04 100644 --- a/modern/src/common/components/PositionValue.jsx +++ b/modern/src/common/components/PositionValue.jsx @@ -19,6 +19,7 @@ import { formatVolume, formatConsumption, } from '../util/formatter'; +import { speedToKnots } from '../util/converter'; import { useAttributePreference, usePreference } from '../util/preferences'; import { useTranslation } from './LocalizationProvider'; import { useAdministrator } from '../util/permissions'; @@ -53,8 +54,9 @@ const PositionValue = ({ position, property, attribute }) => { case 'longitude': return formatCoordinate('longitude', value, coordinateFormat); case 'speed': - case 'obdSpeed': return value != null ? formatSpeed(value, speedUnit, t) : ''; + case 'obdSpeed': + return value != null ? formatSpeed(speedToKnots(value, 'kmh'), speedUnit, t) : ''; case 'course': return formatCourse(value); case 'altitude': |