Skip to content

Commit

Permalink
commander: fix disarming for rovers
Browse files Browse the repository at this point in the history
We have to ignore the landed flag for rovers, it doesn't really apply
for them.
  • Loading branch information
julianoes committed Jul 26, 2019
1 parent 308d91e commit 98dfa30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/commander/Commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_
// Arm/disarm is enforced only when param2 is set to a magic number.
const bool enforce_in_air = (static_cast<int>(std::round(cmd.param2)) == 21196);

if (!enforce_in_air && !land_detector.landed) {
if (!enforce_in_air && !land_detector.landed && !is_ground_rover(&status)) {
if (cmd_arms) {
mavlink_log_critical(&mavlink_log_pub, "Arming denied! Not landed");

Expand Down

0 comments on commit 98dfa30

Please sign in to comment.