From 7ef3b92109878c0766e4afff58fc143bc9071f46 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 27 Mar 2017 16:21:02 -1000 Subject: [PATCH] Fixes lost RC on px4fmu-v4 A recent change in in the fmu stops the instance when a xxxx_reset command is used issued if the fmu was not already running. That change left publications published and then on the next creation created a new publications was created. This change calls orb_unadvertise to mark the publication as un published so that on the next instantiations of the fmu it resumes publishing on the same publication. --- src/drivers/px4fmu/fmu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index e49714b24a..2e0eb0ca2d 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -1764,6 +1764,11 @@ void PX4FMU::stop() orb_unsubscribe(_armed_sub); orb_unsubscribe(_param_sub); + orb_unadvertise(_to_input_rc); + orb_unadvertise(_outputs_pub); + orb_unadvertise(_to_safety); + orb_unadvertise(_to_mixer_status); + /* make sure servos are off */ up_pwm_servo_deinit();