aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-10-07 06:40:21 +0800
committerAnton Tananaev <anton@traccar.org>2023-10-07 06:40:21 +0800
commitb8b84db2104b26dfeedbe1faaa4a52fef608cd1c (patch)
tree18aef3bdb56f7d1b55593344e4cf34d9df4f5ed9 /src/main/java/org
parent0a5eb9c2b2c4ea767359645d35439c892f7f0774 (diff)
downloadtrackermap-server-b8b84db2104b26dfeedbe1faaa4a52fef608cd1c.tar.gz
trackermap-server-b8b84db2104b26dfeedbe1faaa4a52fef608cd1c.tar.bz2
trackermap-server-b8b84db2104b26dfeedbe1faaa4a52fef608cd1c.zip
Inline expression
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index ac1108a64..23750be8d 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -163,8 +163,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
boolean positionType = type == MSG_GPS || type == MSG_GPS_2 || type == MSG_ALARM || type == MSG_ALARM_2;
if (!positionType) {
- var serial = header == 0x2323 ? 0x0001 : index;
- sendResponse(channel, header, type, serial, imei, 0);
+ sendResponse(channel, header, type, header == 0x2323 ? 1 : index, imei, 0);
}
if (positionType) {
@@ -519,8 +518,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
boolean acknowledgement = AttributeUtil.lookup(
getCacheManager(), Keys.PROTOCOL_ACK.withPrefix(getProtocolName()), deviceSession.getDeviceId());
if (acknowledgement || type == MSG_ALARM || type == MSG_ALARM_2) {
- var serial = header == 0x2323 ? 0x0001 : index;
- sendResponse(channel, header, type, serial, imei, alarm);
+ sendResponse(channel, header, type, header == 0x2323 ? 1 : index, imei, alarm);
}
return position;