Skip to content

Commit

Permalink
Plane: massive refactor and creation of Mode class
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub authored and tridge committed Apr 2, 2019
1 parent 49efe53 commit 0270c57
Show file tree
Hide file tree
Showing 55 changed files with 1,688 additions and 996 deletions.
12 changes: 6 additions & 6 deletions ArduPlane/APM_Config.h.reference
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@
//
//#define FLIGHT_MODE_CHANNEL 8
//
//#define FLIGHT_MODE_1 RTL
//#define FLIGHT_MODE_2 RTL
//#define FLIGHT_MODE_3 STABILIZE
//#define FLIGHT_MODE_4 STABILIZE
//#define FLIGHT_MODE_5 MANUAL
//#define FLIGHT_MODE_6 MANUAL
//#define FLIGHT_MODE_1 Mode::Number::RTL
//#define FLIGHT_MODE_2 Mode::Number::RTL
//#define FLIGHT_MODE_3 Mode::Number::STABILIZE
//#define FLIGHT_MODE_4 Mode::Number::STABILIZE
//#define FLIGHT_MODE_5 Mode::Number::MANUAL
//#define FLIGHT_MODE_6 Mode::Number::MANUAL
//

//////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/AP_Arming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bool AP_Arming_Plane::pre_arm_checks(bool display_failure)
}
}

if (plane.control_mode == AUTO && plane.mission.num_commands() <= 1) {
if (plane.control_mode == &plane.mode_auto && plane.mission.num_commands() <= 1) {
check_failed(ARMING_CHECK_NONE, display_failure, "No mission loaded");
ret = false;
}
Expand Down
Loading

0 comments on commit 0270c57

Please sign in to comment.