From 120c1150ceac88e211ce1de848d8fe4d098ed03d Mon Sep 17 00:00:00 2001 From: Rushdi Date: Mon, 13 Jun 2022 12:14:22 +0530 Subject: [PATCH] fix traccar speed measure on kmh --- .../device/mgt/core/traccar/common/util/TraccarUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/traccar/common/util/TraccarUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/traccar/common/util/TraccarUtil.java index 95aea15585..6063d4d0c1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/traccar/common/util/TraccarUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/traccar/common/util/TraccarUtil.java @@ -29,6 +29,8 @@ import java.util.List; public class TraccarUtil { public static JSONObject TraccarUserPayload(TraccarUser traccarUser){ JSONObject payload = new JSONObject(); + JSONObject attribute = new JSONObject(); + attribute.put("speedUnit", "kmh"); payload.put("id", traccarUser.getId()); payload.put("name", traccarUser.getName()); payload.put("login", traccarUser.getLogin()); @@ -42,6 +44,7 @@ public class TraccarUtil { payload.put("deviceReadonly", traccarUser.getDeviceReadonly()); payload.put("readonly", traccarUser.getReadonly()); payload.put("expirationTime", traccarUser.getExpirationTime()); + payload.put("attributes", attribute); return payload; }