From 6f949510501c34c3a114db7fdb32d6fb8d47c36a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 13 May 2015 15:46:35 +0200 Subject: Fix sdlog2 stopping on param write. Found by Severin Leuenberger --- src/modules/sdlog2/sdlog2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index ae4913559..c76569cf8 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -1975,10 +1975,10 @@ void handle_command(struct vehicle_command_s *cmd) if (param == 1) { sdlog2_start_log(); - } else if (param == 0) { + } else if (param == -1) { sdlog2_stop_log(); } else { - warnx("unknown storage cmd"); + // Silently ignore non-matching command values, as they could be for params. } break; -- cgit v1.2.3