aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/IntellitracProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/IntellitracProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index 052e7a508..fd393da45 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -88,12 +88,12 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
// Date and time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();
- time.set(Calendar.YEAR, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);
- time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.HOUR_OF_DAY, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));
- time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));
+ time.set(Calendar.YEAR, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.MONTH, Integer.parseInt(parser.group(index++)) - 1);
+ time.set(Calendar.DAY_OF_MONTH, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.HOUR_OF_DAY, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.MINUTE, Integer.parseInt(parser.group(index++)));
+ time.set(Calendar.SECOND, Integer.parseInt(parser.group(index++)));
position.setTime(time.getTime());
// Location data
@@ -104,12 +104,12 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
position.setAltitude(Double.valueOf(parser.group(index++)));
// Satellites
- int satellites = Integer.valueOf(parser.group(index++));
+ int satellites = Integer.parseInt(parser.group(index++));
position.setValid(satellites >= 3);
position.set(Event.KEY_SATELLITES, satellites);
// Report identifier
- position.set(Event.KEY_INDEX, Long.valueOf(parser.group(index++)));
+ position.set(Event.KEY_INDEX, Long.parseLong(parser.group(index++)));
// Input
position.set(Event.KEY_INPUT, parser.group(index++));
@@ -132,6 +132,7 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
position.set("tpl", parser.group(index++));
position.set("axle", parser.group(index++));
position.set(Event.KEY_ODOMETER, parser.group(index++));
+
return position;
}