aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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"));