msg landing_gear: change type to int8

This commit is contained in:
Simone Guscetti
2018-12-10 16:17:23 +01:00
committed by Dennis Mannhart
parent ee41e3181f
commit aac9221d95
3 changed files with 6 additions and 7 deletions
@@ -812,12 +812,11 @@ MulticopterPositionControl::run()
// they might conflict with each other such as in offboard attitude control.
publish_attitude();
if (_old_landing_gear_position != constraints.landing_gear) {
_landing_gear_state.landing_gear =
(constraints.landing_gear == vehicle_constraints_s::GEAR_UP) ?
landing_gear_s::LANDING_GEAR_UP :
landing_gear_s::LANDING_GEAR_DOWN;
// if theres any change in landing gear setpoint publish it
if (_old_landing_gear_position != constraints.landing_gear
&& constraints.landing_gear != vehicle_constraints_s::GEAR_KEEP) {
_landing_gear_state.landing_gear = constraints.landing_gear;
_landing_gear_state.timestamp = hrt_absolute_time();
if (_landing_gear_pub != nullptr) {