aboutsummaryrefslogtreecommitdiff
path: root/src/common/attributes/useCommonDeviceAttributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/attributes/useCommonDeviceAttributes.js')
-rw-r--r--src/common/attributes/useCommonDeviceAttributes.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/common/attributes/useCommonDeviceAttributes.js b/src/common/attributes/useCommonDeviceAttributes.js
new file mode 100644
index 00000000..f9214818
--- /dev/null
+++ b/src/common/attributes/useCommonDeviceAttributes.js
@@ -0,0 +1,21 @@
+import { useMemo } from 'react';
+
+export default (t) => useMemo(() => ({
+ speedLimit: {
+ name: t('attributeSpeedLimit'),
+ type: 'number',
+ subtype: 'speed',
+ },
+ fuelDropThreshold: {
+ name: t('attributeFuelDropThreshold'),
+ type: 'number',
+ },
+ fuelIncreaseThreshold: {
+ name: t('attributeFuelIncreaseThreshold'),
+ type: 'number',
+ },
+ 'report.ignoreOdometer': {
+ name: t('attributeReportIgnoreOdometer'),
+ type: 'boolean',
+ },
+}), [t]);