aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
index dbac159b3..2237dcebc 100644
--- a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -111,23 +111,23 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
private String decodeEvent(String event, Position position) {
if (event.length() == 1) {
- char inputStatus = event.charAt(0);
- if (inputStatus >= 'A' && inputStatus <= 'D') {
- int inputStatusInt = inputStatus - 'A';
- position.set(Position.PREFIX_IN + 1, inputStatusInt & 1);
- position.set(Position.PREFIX_IN + 2, inputStatusInt & 2);
+ char inputStatus = event.charAt(0);
+ if (inputStatus >= 'A' && inputStatus <= 'D') {
+ int inputStatusInt = inputStatus - 'A';
+ position.set(Position.PREFIX_IN + 1, inputStatusInt & 1);
+ position.set(Position.PREFIX_IN + 2, inputStatusInt & 2);
position.set(Position.PREFIX_IN + 3, 0);
- return null;
- } else if (inputStatus >= 'O' && inputStatus <= 'R') {
+ return null;
+ } else if (inputStatus >= 'O' && inputStatus <= 'R') {
int inputStatusInt = inputStatus - 'O';
position.set(Position.PREFIX_IN + 1, inputStatusInt & 1);
- position.set(Position.PREFIX_IN + 2, inputStatusInt & 2);
+ position.set(Position.PREFIX_IN + 2, inputStatusInt & 2);
position.set(Position.PREFIX_IN + 3, 1);
return null;
}
- }
+ }
- return event;
+ return event;
}