Fix invalid offboard setpoints for fw pos control

This commit fixes a regression that disables offboard control
This commit is contained in:
Jaeyoung Lim 2022-11-24 17:26:36 +01:00 committed by Silvan Fuhrer
parent 5d7faefa84
commit 65577a4f89
1 changed files with 2 additions and 3 deletions

View File

@ -2199,12 +2199,11 @@ FixedwingPositionControl::Run()
}
}
_position_setpoint_current_valid = valid_setpoint;
if (!valid_setpoint) {
events::send(events::ID("fixedwing_position_control_invalid_offboard_sp"), events::Log::Error,
"Invalid offboard setpoint");
} else {
_pos_sp_triplet.current.valid = valid_setpoint;
}
}