aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CityeasyProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-24 16:49:54 +1300
committerGitHub <noreply@github.com>2016-11-24 16:49:54 +1300
commitebe64e810bd8e57a805a571cfd6110fbc3cd57c1 (patch)
tree90d8bb347c6081116df225d5c1e08f9469458675 /src/org/traccar/protocol/CityeasyProtocolEncoder.java
parent04f33e6ba29b3a73a65b081d2a8b6ac3e0e0ebee (diff)
parent03fb12d4a9453d6845198a167a70e720726df2e2 (diff)
downloadtrackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.tar.gz
trackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.tar.bz2
trackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.zip
Merge pull request #2593 from Abyss777/attributes_helpers
Attributes helpers
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/CityeasyProtocolEncoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/CityeasyProtocolEncoder.java b/src/org/traccar/protocol/CityeasyProtocolEncoder.java
index 0c149c1c9..c800131d6 100644
--- a/src/org/traccar/protocol/CityeasyProtocolEncoder.java
+++ b/src/org/traccar/protocol/CityeasyProtocolEncoder.java
@@ -50,13 +50,13 @@ public class CityeasyProtocolEncoder extends BaseProtocolEncoder {
case Command.TYPE_POSITION_SINGLE:
return encodeContent(CityeasyProtocolDecoder.MSG_LOCATION_REQUEST, content);
case Command.TYPE_POSITION_PERIODIC:
- content.writeShort(((Number) command.getAttributes().get(Command.KEY_FREQUENCY)).intValue());
+ content.writeShort(command.getInteger(Command.KEY_FREQUENCY));
return encodeContent(CityeasyProtocolDecoder.MSG_LOCATION_INTERVAL, content);
case Command.TYPE_POSITION_STOP:
content.writeShort(0);
return encodeContent(CityeasyProtocolDecoder.MSG_LOCATION_INTERVAL, content);
case Command.TYPE_SET_TIMEZONE:
- int timezone = ((Number) command.getAttributes().get(Command.KEY_TIMEZONE)).intValue();
+ int timezone = command.getInteger(Command.KEY_TIMEZONE);
if (timezone < 0) {
content.writeByte(1);
} else {