aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeitrackProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 11:10:55 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 11:10:55 +1200
commit93feb8a5484fd6c4c3da2032d4c843b3194b5ff7 (patch)
tree65902d2f1e71a776814d66b68d79c3a307febc2b /src/org/traccar/protocol/MeitrackProtocolDecoder.java
parent88e777a2ceb50e34dbe9577237483d8d3cebf346 (diff)
downloadtrackermap-server-93feb8a5484fd6c4c3da2032d4c843b3194b5ff7.tar.gz
trackermap-server-93feb8a5484fd6c4c3da2032d4c843b3194b5ff7.tar.bz2
trackermap-server-93feb8a5484fd6c4c3da2032d4c843b3194b5ff7.zip
Create prefixes for other data
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 8828bfd23..f9dfcd1f2 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -142,15 +142,15 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
// ADC
String adc1 = parser.group(index++);
if (adc1 != null) {
- position.set("adc1", Integer.parseInt(adc1, 16));
+ position.set(Event.PREFIX_ADC + 1, Integer.parseInt(adc1, 16));
}
String adc2 = parser.group(index++);
if (adc2 != null) {
- position.set("adc2", Integer.parseInt(adc2, 16));
+ position.set(Event.PREFIX_ADC + 2, Integer.parseInt(adc2, 16));
}
String adc3 = parser.group(index++);
if (adc3 != null) {
- position.set("adc3", Integer.parseInt(adc3, 16));
+ position.set(Event.PREFIX_ADC + 3, Integer.parseInt(adc3, 16));
}
position.set(Event.KEY_BATTERY, Integer.parseInt(parser.group(index++), 16));
position.set(Event.KEY_POWER, Integer.parseInt(parser.group(index++), 16));
@@ -235,7 +235,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
position.set("state", buf.readUnsignedShort());
// ADC
- position.set("adc1", buf.readUnsignedShort());
+ position.set(Event.PREFIX_ADC + 1, buf.readUnsignedShort());
position.set(Event.KEY_BATTERY, buf.readUnsignedShort() * 0.01);
position.set(Event.KEY_POWER, buf.readUnsignedShort());