From 058bc97c838d9ff3958e95c3ad18098f2d75ef36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 22 Feb 2017 12:11:10 +0100 Subject: [PATCH] commander preflight calibration: accept param6 == 2 for airspeed calibration as well This is according to the updated mavlink spec to deconflict the definition with APM. --- src/modules/commander/commander.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 80cc17f337..3d0e148e03 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -4108,7 +4108,8 @@ void *commander_low_prio_loop(void *arg) // board offset calibration answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED, command_ack_pub, command_ack); calib_ret = do_level_calibration(&mavlink_log_pub); - } else if ((int)(cmd.param6) == 1) { + } else if ((int)(cmd.param6) == 1 || (int)(cmd.param6) == 2) { + // TODO: param6 == 1 is deprecated, but we still accept it for a while (feb 2017) /* airspeed calibration */ answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED, command_ack_pub, command_ack); calib_ret = do_airspeed_calibration(&mavlink_log_pub);