mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Merge pull request #6285 from MrD-RC/autolaunch-low-throttle-indication
Autolaunch low throttle indication
This commit is contained in:
commit
d4a2971845
3 changed files with 59 additions and 49 deletions
|
@ -121,6 +121,10 @@ static const uint8_t beep_runtimeCalibrationDone[] = {
|
|||
static const uint8_t beep_launchModeBeep[] = {
|
||||
5, 5, 5, 100, BEEPER_COMMAND_STOP
|
||||
};
|
||||
// Two short beeps, then one shorter beep. Beeps to show the throttle needs to be raised. Will repeat every second while the throttle is low.
|
||||
static const uint8_t beep_launchModeLowThrottleBeep[] = {
|
||||
5, 5, 5, 5, 3, 100, BEEPER_COMMAND_STOP
|
||||
};
|
||||
// short beeps
|
||||
static const uint8_t beep_hardwareFailure[] = {
|
||||
10, 10, BEEPER_COMMAND_STOP
|
||||
|
@ -184,11 +188,12 @@ typedef struct beeperTableEntry_s {
|
|||
{ BEEPER_ENTRY(BEEPER_SYSTEM_INIT, 17, NULL, "SYSTEM_INIT") },
|
||||
{ BEEPER_ENTRY(BEEPER_USB, 18, NULL, "ON_USB") },
|
||||
{ BEEPER_ENTRY(BEEPER_LAUNCH_MODE_ENABLED, 19, beep_launchModeBeep, "LAUNCH_MODE") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_OPEN, 20, beep_camOpenBeep, "CAM_CONNECTION_OPEN") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_CLOSE, 21, beep_camCloseBeep, "CAM_CONNECTION_CLOSED") },
|
||||
{ BEEPER_ENTRY(BEEPER_LAUNCH_MODE_LOW_THROTTLE, 20, beep_launchModeLowThrottleBeep, "LAUNCH_MODE_LOW_THROTTLE") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_OPEN, 21, beep_camOpenBeep, "CAM_CONNECTION_OPEN") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_CLOSE, 22, beep_camCloseBeep, "CAM_CONNECTION_CLOSED") },
|
||||
|
||||
{ BEEPER_ENTRY(BEEPER_ALL, 22, NULL, "ALL") },
|
||||
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 23, NULL, "PREFERED") },
|
||||
{ BEEPER_ENTRY(BEEPER_ALL, 23, NULL, "ALL") },
|
||||
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 24, NULL, "PREFERED") },
|
||||
};
|
||||
|
||||
static const beeperTableEntry_t *currentBeeperEntry = NULL;
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef enum {
|
|||
BEEPER_SYSTEM_INIT, // Initialisation beeps when board is powered on
|
||||
BEEPER_USB, // Some boards have beeper powered USB connected
|
||||
BEEPER_LAUNCH_MODE_ENABLED, // Fixed-wing launch mode enabled
|
||||
BEEPER_LAUNCH_MODE_LOW_THROTTLE, // Fixed-wing launch mode enabled, but throttle is low
|
||||
BEEPER_CAM_CONNECTION_OPEN, // When the 5 key simulation stated
|
||||
BEEPER_CAM_CONNECTION_CLOSE, // When the 5 key simulation stop
|
||||
|
||||
|
|
|
@ -226,7 +226,11 @@ void applyFixedWingLaunchController(timeUs_t currentTimeUs)
|
|||
|
||||
// Control beeper
|
||||
if (!launchState.launchFinished) {
|
||||
if (calculateThrottleStatus(THROTTLE_STATUS_TYPE_RC) != THROTTLE_LOW) {
|
||||
beeper(BEEPER_LAUNCH_MODE_ENABLED);
|
||||
} else {
|
||||
beeper(BEEPER_LAUNCH_MODE_LOW_THROTTLE);
|
||||
}
|
||||
}
|
||||
|
||||
// Lock out controls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue