mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Add low throttle beeper
This commit is contained in:
parent
be338c0ffc
commit
6d4c369d77
5 changed files with 37 additions and 26 deletions
|
@ -132,6 +132,7 @@ static const OSD_Entry cmsx_menuFWLaunchEntries[] =
|
|||
OSD_SETTING_ENTRY("IDLE THROTTLE", SETTING_NAV_FW_LAUNCH_IDLE_THR),
|
||||
OSD_SETTING_ENTRY("MOTOR SPINUP TIME", SETTING_NAV_FW_LAUNCH_SPINUP_TIME),
|
||||
OSD_SETTING_ENTRY("TIMEOUT", SETTING_NAV_FW_LAUNCH_TIMEOUT),
|
||||
OSD_SETTING_ENTRY("END TRANSITION TIME", SETTING_NAV_FW_LAUNCH_END_TIME),
|
||||
OSD_SETTING_ENTRY("MAX ALTITUDE", SETTING_NAV_FW_LAUNCH_MAX_ALTITUDE),
|
||||
OSD_SETTING_ENTRY("CLIMB ANGLE", SETTING_NAV_FW_LAUNCH_CLIMB_ANGLE),
|
||||
OSD_SETTING_ENTRY("MAX BANK ANGLE", SETTING_NAV_FW_LAUNCH_MAX_ANGLE),
|
||||
|
|
|
@ -2337,7 +2337,7 @@ groups:
|
|||
max: 1000
|
||||
- name: nav_fw_launch_end_time
|
||||
description: "Time for the transition of throttle and pitch angle, between the launch state and the subsequent flight mode [ms]"
|
||||
default_value: "3000"
|
||||
default_value: "2000"
|
||||
field: fw.launch_end_time
|
||||
min: 0
|
||||
max: 5000
|
||||
|
|
|
@ -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,6 +188,7 @@ 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_LAUNCH_MODE_LOW_THROTTLE, 20, beep_launchModeLowThrottleBeep, "LAUNCH_MODE_LOW_THROTTLE") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_OPEN, 20, beep_camOpenBeep, "CAM_CONNECTION_OPEN") },
|
||||
{ BEEPER_ENTRY(BEEPER_CAM_CONNECTION_CLOSE, 21, beep_camCloseBeep, "CAM_CONNECTION_CLOSED") },
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -390,8 +390,12 @@ void applyFixedWingLaunchController(timeUs_t currentTimeUs) {
|
|||
updateRcCommand();
|
||||
|
||||
// Control beeper
|
||||
if (fwLaunch.currentState == FW_LAUNCH_STATE_WAIT_THROTTLE) {
|
||||
beeper(BEEPER_LAUNCH_MODE_LOW_THROTTLE);
|
||||
} else {
|
||||
beeper(BEEPER_LAUNCH_MODE_ENABLED);
|
||||
}
|
||||
}
|
||||
|
||||
void resetFixedWingLaunchController(timeUs_t currentTimeUs) {
|
||||
setCurrentState(FW_LAUNCH_STATE_WAIT_THROTTLE, currentTimeUs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue