commander: moved offboard bools into status_flags

The offboard status bools were not used anywhere but in the commander.
Therefore they are now moved to the local status_flags topic.
This commit is contained in:
Julian Oes
2016-02-26 10:20:52 +00:00
parent a11a986df8
commit 23df992cc5
4 changed files with 17 additions and 19 deletions

View File

@@ -399,7 +399,7 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta
case vehicle_status_s::MAIN_STATE_OFFBOARD:
/* need offboard signal */
if (!status->offboard_control_signal_lost) {
if (!status_flags->offboard_control_signal_lost) {
ret = TRANSITION_CHANGED;
}
@@ -853,11 +853,11 @@ bool set_nav_state(struct vehicle_status_s *status, const bool data_link_loss_en
case vehicle_status_s::MAIN_STATE_OFFBOARD:
/* require offboard control, otherwise stay where you are */
if (status->offboard_control_signal_lost && !status->rc_signal_lost) {
if (status_flags->offboard_control_signal_lost && !status->rc_signal_lost) {
status->failsafe = true;
status->nav_state = vehicle_status_s::NAVIGATION_STATE_POSCTL;
} else if (status->offboard_control_signal_lost && status->rc_signal_lost) {
} else if (status_flags->offboard_control_signal_lost && status->rc_signal_lost) {
status->failsafe = true;
if (status_flags->condition_local_position_valid) {