summaryrefslogtreecommitdiff
path: root/monitor_sirf.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2011-02-15 15:25:29 +0300
committerEric S. Raymond <esr@thyrsus.com>2011-02-15 07:32:33 -0500
commit720e2dc11ca73abd5a99296006567f6b0c031612 (patch)
treeec55ffc8f5553f0695f0d3186c714c0201a1f4a0 /monitor_sirf.c
parentf1e718f2bb8425ddc25c3b52aa76182bc88422a6 (diff)
downloadgpsd-720e2dc11ca73abd5a99296006567f6b0c031612.tar.gz
Bugfixes in the GPS monitor.
1. Don't send a command if the device is not specified. 2. Always set the subframe_enabled flag to off when we toggle subframe mode, because we're counting on receipt of a subframe packet to turn it on if the command succeeds.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r--monitor_sirf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c
index f9d5cf10..f474bb1a 100644
--- a/monitor_sirf.c
+++ b/monitor_sirf.c
@@ -661,7 +661,11 @@ static int sirf_command(char line[])
putbyte(buf, 23, 0x0c);
putbyte(buf, 24, subframe_enabled ? 0x00 : 0x10);
(void)monitor_control_send(buf, 25);
- subframe_enabled = !subframe_enabled;
+ /*
+ * The subframe_enabled off because we're counting on receipt of
+ * a subframe packet to turn it on if the command succeeds.
+ */
+ subframe_enabled = false;
return COMMAND_MATCH;
case 'M': /* static navigation */