Skip to content

Commit

Permalink
Copter: ignore flight mode change requests if we're already in the de…
Browse files Browse the repository at this point in the history
…sired mode
  • Loading branch information
rmackay9 committed Oct 15, 2013
1 parent deb171a commit 7c7f235
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ArduCopter/system.pde
Expand Up @@ -340,6 +340,11 @@ static bool set_mode(uint8_t mode)
bool success = false;
bool ignore_checks = !motors.armed(); // allow switching to any mode if disarmed. We rely on the arming check to perform

// return immediately if we are already in the desired mode
if (mode == control_mode) {
return true;
}

switch(mode) {
case ACRO:
success = true;
Expand Down

0 comments on commit 7c7f235

Please sign in to comment.