Skip to content
Snippets Groups Projects
Commit 465d399e authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

land_detector: move _parameterSub to the right place

parent b69dd50d
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ void LandDetector::_cycle()
// Initialize uORB topics.
_armingSub = orb_subscribe(ORB_ID(actuator_armed));
_parameterSub = orb_subscribe(ORB_ID(parameter_update));
_initialize_topics();
_check_params(true);
......
......@@ -150,9 +150,6 @@ protected:
orb_advert_t _landDetectedPub{nullptr};
vehicle_land_detected_s _landDetected{};
int _parameterSub{-1};
int _armingSub{-1};
LandDetectionState _state{LandDetectionState::LANDED};
systemlib::Hysteresis _freefall_hysteresis{false};
......@@ -181,6 +178,9 @@ private:
perf_counter_t _cycle_perf;
bool _previous_arming_state{false}; ///< stores the previous _arming.armed state
int _parameterSub{-1};
int _armingSub{-1};
};
......
......@@ -97,7 +97,6 @@ void MulticopterLandDetector::_initialize_topics()
_vehicleLocalPositionSetpointSub = orb_subscribe(ORB_ID(vehicle_local_position_setpoint));
_attitudeSub = orb_subscribe(ORB_ID(vehicle_attitude));
_actuatorsSub = orb_subscribe(ORB_ID(actuator_controls_0));
_parameterSub = orb_subscribe(ORB_ID(parameter_update));
_sensor_bias_sub = orb_subscribe(ORB_ID(sensor_bias));
_vehicle_control_mode_sub = orb_subscribe(ORB_ID(vehicle_control_mode));
_battery_sub = orb_subscribe(ORB_ID(battery_status));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment