aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormattti-post <60095729+mattti-post@users.noreply.github.com>2020-06-15 16:58:43 +0200
committerGitHub <noreply@github.com>2020-06-15 07:58:43 -0700
commit4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934 (patch)
treee2684bc145f6d89dbd35f2a961cb5d293890f546 /src
parent94c04282f1b3792bc2c16758049a57f4c42941c9 (diff)
downloadtrackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.tar.gz
trackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.tar.bz2
trackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.zip
Update WatchProtocolEncoder.java (#4545)
Based on protocol documentation, the implementation of Command.TYPE_POSITION_SINGLE is wrong. "RG" message is supposed to be issued when requesting location data from BTS (no gps signal) "CR" message instructs the terminal to wake up gps module immediately and send gps positions in 10 sec intervals during the timespan of 3 minutes. https://www.traccar.org/protocols/ Communication Protocol.doc 比电协议V1.8(20160926).doc https://github.com/tananaev/traccar/files/213814/3g.elec.comm.protocol.docx
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/WatchProtocolEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java b/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java
index f285267ba..f1904ea4d 100644
--- a/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java
@@ -135,7 +135,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin
case Command.TYPE_CUSTOM:
return formatTextCommand(channel, command, command.getString(Command.KEY_DATA));
case Command.TYPE_POSITION_SINGLE:
- return formatTextCommand(channel, command, "RG");
+ return formatTextCommand(channel, command, "CR");
case Command.TYPE_SOS_NUMBER:
return formatTextCommand(channel, command, "SOS%s,%s", Command.KEY_INDEX, Command.KEY_PHONE);
case Command.TYPE_ALARM_SOS: