diff options
author | Anton Tananaev <anton@traccar.org> | 2022-11-02 17:57:22 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-11-02 17:57:22 -0700 |
commit | 9280355123ee13f7f7d8bf7076a39dcab57ab1cd (patch) | |
tree | e2cd820dc11d75048dd89c2b4ad54c8e5188da74 /src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java | |
parent | 49646eccd5ec57013c78ea0a0776c206f812cb0b (diff) | |
download | trackermap-server-9280355123ee13f7f7d8bf7076a39dcab57ab1cd.tar.gz trackermap-server-9280355123ee13f7f7d8bf7076a39dcab57ab1cd.tar.bz2 trackermap-server-9280355123ee13f7f7d8bf7076a39dcab57ab1cd.zip |
Improve attribute type handling
Diffstat (limited to 'src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java b/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java index 03f0e7ecf..5859d91ce 100644 --- a/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/MeiligaoProtocolEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,8 +99,8 @@ public class MeiligaoProtocolEncoder extends BaseProtocolEncoder { content.writeShort(command.getInteger(Command.KEY_FREQUENCY) / 10); return encodeContent(command.getDeviceId(), MeiligaoProtocolDecoder.MSG_TRACK_BY_INTERVAL, content); case Command.TYPE_OUTPUT_CONTROL: - int index = Integer.parseInt(command.getString(Command.KEY_INDEX)) - 1; - int value = Integer.parseInt(command.getString(Command.KEY_DATA)); + int index = command.getInteger(Command.KEY_INDEX) - 1; + int value = command.getInteger(Command.KEY_DATA); return encodeOutputCommand(command.getDeviceId(), index, value); case Command.TYPE_ENGINE_STOP: return encodeOutputCommand(command.getDeviceId(), 1, 1); |