diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-23 17:34:25 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-23 17:34:25 +0500 |
commit | e89bbb8ee9dd1dd1f19fb33f1f9291c6ae5f43db (patch) | |
tree | 51376f73260c9bbc89064ba2b5f2a428b6d46785 /src/org/traccar/protocol/CityeasyProtocolEncoder.java | |
parent | dbbe99269140f057d3f72acca557730a6b10e902 (diff) | |
download | trackermap-server-e89bbb8ee9dd1dd1f19fb33f1f9291c6ae5f43db.tar.gz trackermap-server-e89bbb8ee9dd1dd1f19fb33f1f9291c6ae5f43db.tar.bz2 trackermap-server-e89bbb8ee9dd1dd1f19fb33f1f9291c6ae5f43db.zip |
Implement attributes helpers
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocolEncoder.java')
-rw-r--r-- | src/org/traccar/protocol/CityeasyProtocolEncoder.java | 4 |
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 { |