[rotorcraft] add MODE_STARTUP to make flying without RC possible

Based on Freek van Tienen's commit, thx.
closes #467 for now
This commit is contained in:
Felix Ruess
2013-07-02 16:48:01 +02:00
parent ffecd0c157
commit 06c4e842ab
2 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -97,9 +97,10 @@
</section>
<section name="AUTOPILOT">
<define name="MODE_STARTUP" value="AP_MODE_NAV" />
<define name="MODE_MANUAL" value="AP_MODE_RC_DIRECT" />
<define name="MODE_AUTO1" value="AP_MODE_NAV" />
<define name="MODE_AUTO2" value="AP_MODE_HOVER_Z_HOLD" />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD" />
<define name="MODE_AUTO2" value="AP_MODE_NAV" />
</section>
<section name="BAT">
+6 -1
View File
@@ -73,8 +73,13 @@ static inline int ahrs_is_aligned(void) {
#include "autopilot_arming_yaw.h"
#endif
#ifndef MODE_STARTUP
#define MODE_STARTUP AP_MODE_KILL
PRINT_CONFIG_MSG("Using AP_MODE_KILL as MODE_STARTUP")
#endif
void autopilot_init(void) {
autopilot_mode = AP_MODE_KILL;
autopilot_mode = MODE_STARTUP;
autopilot_motors_on = FALSE;
kill_throttle = ! autopilot_motors_on;
autopilot_in_flight = FALSE;