aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-02-14 19:44:49 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-02-14 19:44:49 -0800
commit7c6b8e8754c5bd687b50349eb1ff8d651577d6cb (patch)
treedb160772903a419348af83302c7ab6c4e3770ae9 /src/main/java
parent1c73bae2e23242673e0a07cdbc2493700f134ceb (diff)
downloadtrackermap-server-7c6b8e8754c5bd687b50349eb1ff8d651577d6cb.tar.gz
trackermap-server-7c6b8e8754c5bd687b50349eb1ff8d651577d6cb.tar.bz2
trackermap-server-7c6b8e8754c5bd687b50349eb1ff8d651577d6cb.zip
Decode Hoopo speed value
Diffstat (limited to 'src/main/java')
-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;
}