From 93feb8a5484fd6c4c3da2032d4c843b3194b5ff7 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 4 May 2015 11:10:55 +1200 Subject: Create prefixes for other data --- src/org/traccar/protocol/MeitrackProtocolDecoder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java') 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()); -- cgit v1.2.3