diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 11ecb5d72..38ecde519 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -218,7 +218,8 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { if (parser.hasNext()) { for (String temp : parser.next().split("\\|")) { int index = Integer.valueOf(temp.substring(0, 2), 16); - int value = Integer.valueOf(temp.substring(2), 16); + double value = Byte.valueOf(temp.substring(2, 4), 16); + value += (value < 0 ? -0.01 : 0.01) * Integer.valueOf(temp.substring(4), 16); position.set(Position.PREFIX_TEMP + index, value); } } |