forked from traccar/traccar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
39 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2015 - 2020 Anton Tananaev ([email protected]) | ||
* Copyright 2015 - 2022 Anton Tananaev ([email protected]) | ||
* | ||
* 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 @@ protected Object encodeCommand(Command command) { | |
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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters