aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CityeasyProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
commit398b705820109c1103d915a2fec81fcf70b032cf (patch)
tree659a0483eda19f9c91855197b70fd2a0bfb82a60 /src/org/traccar/protocol/CityeasyProtocolEncoder.java
parent2da5669f8bd3f734fa37626c892aebdff7268613 (diff)
downloadtrackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.gz
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.bz2
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.zip
Fix some check style issues
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/CityeasyProtocolEncoder.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CityeasyProtocolEncoder.java b/src/org/traccar/protocol/CityeasyProtocolEncoder.java
index 76c4199e1..9c5695001 100644
--- a/src/org/traccar/protocol/CityeasyProtocolEncoder.java
+++ b/src/org/traccar/protocol/CityeasyProtocolEncoder.java
@@ -19,6 +19,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.traccar.BaseProtocolEncoder;
import org.traccar.helper.Checksum;
+import org.traccar.helper.Log;
import org.traccar.model.Command;
public class CityeasyProtocolEncoder extends BaseProtocolEncoder {
@@ -56,9 +57,16 @@ public class CityeasyProtocolEncoder extends BaseProtocolEncoder {
return encodeContent(CityeasyProtocolDecoder.MSG_LOCATION_INTERVAL, content);
case Command.TYPE_SET_TIMEZONE:
int timezone = ((Number) command.getAttributes().get(Command.KEY_TIMEZONE)).intValue();
- content.writeByte(timezone < 0 ? 1 : 0);
+ if (timezone < 0) {
+ content.writeByte(1);
+ } else {
+ content.writeByte(0);
+ }
content.writeShort(Math.abs(timezone) / 60);
return encodeContent(CityeasyProtocolDecoder.MSG_TIMEZONE, content);
+ default:
+ Log.warning(new UnsupportedOperationException(command.getType()));
+ break;
}
return null;