From f1ebd036b09c2ff1668e5884c60fe9e8eea6f453 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 28 Oct 2013 16:54:32 +1100 Subject: [PATCH] Copter: fixed baro-only preflight cal this was causing a full level, which mucked up the INS calibration --- ArduCopter/GCS_Mavlink.pde | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.pde b/ArduCopter/GCS_Mavlink.pde index 942b26419c..99816b3064 100644 --- a/ArduCopter/GCS_Mavlink.pde +++ b/ArduCopter/GCS_Mavlink.pde @@ -1210,10 +1210,12 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) case MAV_CMD_PREFLIGHT_CALIBRATION: if (packet.param1 == 1 || - packet.param2 == 1 || - packet.param3 == 1) { + packet.param2 == 1) { ins.init_accel(); ahrs.set_trim(Vector3f(0,0,0)); // clear out saved trim + } + if (packet.param3 == 1) { + init_barometer(); } if (packet.param4 == 1) { trim_radio();