From 8cb446c2333812925deecc2278a23a2961429b40 Mon Sep 17 00:00:00 2001 From: Matthias Grob <maetugr@gmail.com> Date: Mon, 12 Nov 2018 15:48:08 +0000 Subject: [PATCH] mc_pos_control: remove useless landed state copy If the landed state was set before the position controller starts it would get updated with the first poll_subscriptions() anyways. But it's not on all posix and nuttx platforms I tested and the deleted statement just copies the zero message into the struct which is already zero. --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index eedbd3bd1d..f9ac3d71a2 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -588,9 +588,6 @@ MulticopterPositionControl::run() // get an initial update for all sensor and status data poll_subscriptions(); - // We really need to know from the beginning if we're landed or in-air. - orb_copy(ORB_ID(vehicle_land_detected), _vehicle_land_detected_sub, &_vehicle_land_detected); - hrt_abstime t_prev = 0; // Let's be safe and have the landing gear down by default -- GitLab