mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
[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:
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user