diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-20 19:13:44 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-20 19:13:44 +1200 |
commit | 6bbd1a20873eae643b7df61333f2cef5cd57ee39 (patch) | |
tree | 6151eae5ba657d077a335533603dabbe344ea13c /src/org | |
parent | dbc9910a144f9395e632d65862e8ac9989d516ec (diff) | |
parent | e2a7ac2da731a9b5ffb4ea49cf92d597d68ca0c5 (diff) | |
download | trackermap-server-6bbd1a20873eae643b7df61333f2cef5cd57ee39.tar.gz trackermap-server-6bbd1a20873eae643b7df61333f2cef5cd57ee39.tar.bz2 trackermap-server-6bbd1a20873eae643b7df61333f2cef5cd57ee39.zip |
Merge pull request #673 from errohitsinghal/patch-1
Update CarTrack protocol decoder
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/CarTrackProtocolDecoder.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java index de730f00a..c5242497c 100644 --- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java +++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java @@ -130,7 +130,18 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder { // State extendedInfo.set("io", parser.group(index++)); - extendedInfo.set("milage", parser.group(index++)); + /* Start : Added By Rohit Singhal, Decode Milage Data*/ + // Prepare Mile Meter Data + String milage = parser.group(index++); + milage = milage.replace(":", "A"); + milage = milage.replace(";", "B"); + milage = milage.replace("<", "C"); + milage = milage.replace("=", "D"); + milage = milage.replace(">", "E"); + milage = milage.replace("?", "F"); + extendedInfo.set("milage", Integer.parseInt(milage, 16)); + /* Commented By Rohit extendedInfo.set("milage", parser.group(index++)); */ + /*End : Added By Rohit Singhal, Decode Milage Data*/ extendedInfo.set("alarm", parser.group(index++)); extendedInfo.set("ad", parser.group(index++)); |