aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/HoopoProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/HoopoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HoopoProtocolDecoder.java
index 65333ba6e..af51a99c6 100644
--- a/src/main/java/org/traccar/protocol/HoopoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HoopoProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Anton Tananaev (anton@traccar.org)
+ * Copyright 2021 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,6 +62,10 @@ public class HoopoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_EVENT, eventData.getString("eventType"));
position.set(Position.KEY_BATTERY_LEVEL, eventData.getInt("batteryLevel"));
+ if (json.containsKey("movement")) {
+ position.setSpeed(json.getJsonObject("movement").getInt("Speed"));
+ }
+
return position;
}