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.
This commit is contained in:
David Sidrane
2017-03-27 16:21:02 -10:00
committed by Lorenz Meier
parent 79d15ad2f0
commit 7ef3b92109
+5
View File
@@ -1764,6 +1764,11 @@ void PX4FMU::stop()
orb_unsubscribe(_armed_sub); orb_unsubscribe(_armed_sub);
orb_unsubscribe(_param_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 */ /* make sure servos are off */
up_pwm_servo_deinit(); up_pwm_servo_deinit();