aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-09-09 19:09:54 -0700
committerAnton Tananaev <anton@traccar.org>2023-09-09 19:09:54 -0700
commit023ab3249c1cbeb89e44af0d9f6c98130519a67d (patch)
treea98137432d99d4eda296bccb483800b38b3e5d1c /src/main/java/org
parent2dcc3e0ee0ac637ca85e2457dc3d12c4edc01ec4 (diff)
downloadtrackermap-server-023ab3249c1cbeb89e44af0d9f6c98130519a67d.tar.gz
trackermap-server-023ab3249c1cbeb89e44af0d9f6c98130519a67d.tar.bz2
trackermap-server-023ab3249c1cbeb89e44af0d9f6c98130519a67d.zip
Add missing Ramac attributes
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/RamacProtocolDecoder.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RamacProtocolDecoder.java b/src/main/java/org/traccar/protocol/RamacProtocolDecoder.java
index ffe04a298..ffdc68474 100644
--- a/src/main/java/org/traccar/protocol/RamacProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RamacProtocolDecoder.java
@@ -71,9 +71,22 @@ public class RamacProtocolDecoder extends BaseHttpProtocolDecoder {
}
}
+ if (json.containsKey("GpsEvent")) {
+ position.set("gpsEvent", json.getInt("GpsEvent"));
+ if (json.containsKey("GpsEventText")) {
+ position.set("gpsEventText", json.getString("GpsEventText"));
+ }
+ }
+
if (json.containsKey("Event")) {
position.set(Position.KEY_EVENT, json.getInt("Event"));
}
+ if (json.containsKey("BatteryPercentage")) {
+ position.set(Position.KEY_BATTERY_LEVEL, json.getInt("BatteryPercentage"));
+ }
+ if (json.containsKey("Battery")) {
+ position.set(Position.KEY_BATTERY, json.getJsonNumber("Battery").doubleValue());
+ }
position.set("deviceType", json.getString("DeviceTypeText"));