1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Launch Control

Adds a race start assistance system that allows the pilot to pitch forward and then release the sticks with the quad holding position for the race start.
This commit is contained in:
Bruce Luckcuck 2018-10-09 19:25:59 -04:00
parent 8609346f21
commit e4dc93b128
14 changed files with 377 additions and 17 deletions

View file

@ -34,6 +34,30 @@ typedef struct throttleCorrectionConfig_s {
uint8_t throttle_correction_value; // the correction that will be applied at throttle_correction_angle.
} throttleCorrectionConfig_t;
typedef enum {
LAUNCH_CONTROL_DISABLED = 0,
LAUNCH_CONTROL_ACTIVE,
LAUNCH_CONTROL_TRIGGERED,
} launchControlState_e;
typedef enum {
LAUNCH_CONTROL_MODE_NORMAL = 0,
LAUNCH_CONTROL_MODE_PITCHONLY,
LAUNCH_CONTROL_MODE_FULL,
LAUNCH_CONTROL_MODE_COUNT // must be the last element
} launchControlMode_e;
typedef enum {
LAUNCH_CONTROL_TRIGGER_MODE_MULTIPLE = 0,
LAUNCH_CONTROL_TRIGGER_MODE_SINGLE,
LAUNCH_CONTROL_TRIGGER_MODE_COUNT // must be the last element
} launchControlTriggerMode_e;
#ifdef USE_LAUNCH_CONTROL
extern const char * const osdLaunchControlModeNames[LAUNCH_CONTROL_MODE_COUNT];
extern const char * const osdLaunchControlTriggerModeNames[LAUNCH_CONTROL_TRIGGER_MODE_COUNT];
#endif
PG_DECLARE(throttleCorrectionConfig_t, throttleCorrectionConfig);
union rollAndPitchTrims_u;
@ -58,3 +82,6 @@ bool isTryingToArm();
void resetTryingToArm();
void subTaskTelemetryPollSensors(timeUs_t currentTimeUs);
bool isLaunchControlActive(void);