Skip to content

Commit

Permalink
Changed soft stop check
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Scott authored and julianoes committed Jun 13, 2019
1 parent 21760a5 commit c4bb6b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/commander/Commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,10 +1668,10 @@ Commander::run()
status_changed = true;
}

const bool is_not_rotary_wing = (status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING);
const bool should_soft_stop = (status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING);

if (armed.soft_stop != is_not_rotary_wing) {
armed.soft_stop = status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING;
if (armed.soft_stop != should_soft_stop) {
armed.soft_stop = should_soft_stop;
status_changed = true;
}
}
Expand Down

0 comments on commit c4bb6b5

Please sign in to comment.