mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-09 12:47:28 +08:00
Merge pull request #1179 from geduxas/master
OBDSpeed expected as km/h not knots.
This commit is contained in:
commit
603d6c12e0
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user