From d7f2c8f548ae4e713493dc1dc0164d722f508c55 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Mon, 26 Dec 2016 18:27:48 -0800 Subject: [PATCH] Fix compiler errors --- src/comm/MockLink.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/comm/MockLink.cc b/src/comm/MockLink.cc index f8dcb64c1..6b946f30f 100644 --- a/src/comm/MockLink.cc +++ b/src/comm/MockLink.cc @@ -780,6 +780,9 @@ void MockLink::_handleFTP(const mavlink_message_t& msg) void MockLink::_handleCommandLong(const mavlink_message_t& msg) { + static bool firstCmdUser3 = true; + static bool firstCmdUser4 = true; + mavlink_command_long_t request; uint8_t commandResult = MAV_RESULT_UNSUPPORTED; @@ -815,7 +818,6 @@ void MockLink::_handleCommandLong(const mavlink_message_t& msg) break; case MAV_CMD_USER_3: // Test command which returns MAV_RESULT_ACCEPTED on second attempt - static bool firstCmdUser3 = true; if (firstCmdUser3) { firstCmdUser3 = false; return; @@ -826,7 +828,6 @@ void MockLink::_handleCommandLong(const mavlink_message_t& msg) break; case MAV_CMD_USER_4: // Test command which returns MAV_RESULT_FAILED on second attempt - static bool firstCmdUser4 = true; if (firstCmdUser4) { firstCmdUser4 = false; return; -- 2.22.0