mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 00:53:34 +08:00
msg landing_gear: change type to int8
This commit is contained in:
committed by
Dennis Mannhart
parent
ee41e3181f
commit
aac9221d95
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user