Trims audio little change
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ extern void beep(uint8_t val);
|
||||
#define AUDIO_POT_STICK_MIDDLE() beep(2)
|
||||
#define AUDIO_VARIO_UP() _beep(1)
|
||||
#define AUDIO_VARIO_DOWN() _beep(1)
|
||||
#define AUDIO_TRIM_MIDDLE() beep(2)
|
||||
#define AUDIO_TRIM_MIDDLE(f) beep(2)
|
||||
#define AUDIO_TELEMETRY_ALARM() { warble = !(g_tmr10ms % 60); AUDIO_WARNING2(); }
|
||||
|
||||
#define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn)
|
||||
|
||||
@@ -153,6 +153,10 @@ void audioQueue::play(uint8_t tFreq, uint8_t tLen, uint8_t tPause,
|
||||
|
||||
void audioQueue::event(uint8_t e, uint8_t f)
|
||||
{
|
||||
#ifdef HAPTIC
|
||||
haptic.event(e); //do this before audio to help sync timings
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.flashBeep && (e <= AU_ERROR || e >= AU_WARNING1))
|
||||
g_LightOffCounter = FLASH_DURATION;
|
||||
|
||||
@@ -192,7 +196,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
break;
|
||||
// trim center
|
||||
case AU_TRIM_MIDDLE:
|
||||
play(BEEP_DEFAULT_FREQ, 10, 2, PLAY_NOW);
|
||||
play(f, 10, 2, PLAY_NOW);
|
||||
break;
|
||||
// warning one
|
||||
case AU_WARNING1:
|
||||
@@ -306,8 +310,5 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
|
||||
void audioDefevent(uint8_t e)
|
||||
{
|
||||
#ifdef HAPTIC
|
||||
haptic.event(e); //do this before audio to help sync timings
|
||||
#endif
|
||||
audio.event(e, BEEP_DEFAULT_FREQ);
|
||||
}
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_POT_STICK_MIDDLE() audioDefevent(AU_POT_STICK_MIDDLE)
|
||||
#define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_TRIM_MIDDLE() audioDefevent(AU_TRIM_MIDDLE)
|
||||
#define AUDIO_TRIM_MIDDLE(f) audio.event(AU_TRIM_MIDDLE, f)
|
||||
#define AUDIO_TELEMETRY_ALARM() audioDefevent(AU_WARNING1)
|
||||
|
||||
#define AUDIO_HEARTBEAT() audio.heartbeat()
|
||||
|
||||
+1
-1
@@ -952,7 +952,7 @@ uint8_t checkTrim(uint8_t event)
|
||||
|
||||
if (beepTrim) {
|
||||
killEvents(event);
|
||||
AUDIO_TRIM_MIDDLE();
|
||||
AUDIO_TRIM_MIDDLE(after);
|
||||
}
|
||||
else {
|
||||
#if defined (AUDIO)
|
||||
|
||||
+5
-4
@@ -150,6 +150,10 @@ void audioQueue::play(uint8_t tFreq, uint8_t tLen, uint8_t tPause,
|
||||
|
||||
void audioQueue::event(uint8_t e, uint8_t f)
|
||||
{
|
||||
#ifdef HAPTIC
|
||||
haptic.event(e); //do this before audio to help sync timings
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.flashBeep && (e <= AU_ERROR || e >= AU_WARNING1))
|
||||
g_LightOffCounter = FLASH_DURATION;
|
||||
|
||||
@@ -189,7 +193,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
break;
|
||||
// trim center
|
||||
case AU_TRIM_MIDDLE:
|
||||
play(BEEP_DEFAULT_FREQ, 10, 2, PLAY_NOW);
|
||||
play(f, 10, 2, PLAY_NOW);
|
||||
break;
|
||||
// warning one
|
||||
case AU_WARNING1:
|
||||
@@ -301,8 +305,5 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
|
||||
void audioDefevent(uint8_t e)
|
||||
{
|
||||
#ifdef HAPTIC
|
||||
haptic.event(e); //do this before audio to help sync timings
|
||||
#endif
|
||||
audio.event(e);
|
||||
}
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_POT_STICK_MIDDLE() audioDefevent(AU_POT_STICK_MIDDLE)
|
||||
#define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_TRIM_MIDDLE() audioDefevent(AU_TRIM_MIDDLE)
|
||||
#define AUDIO_TRIM_MIDDLE(f) audio.event(AU_TRIM_MIDDLE, f)
|
||||
#define AUDIO_TELEMETRY_ALARM() audioDefevent(AU_WARNING1)
|
||||
|
||||
#define AUDIO_DRIVER() audio.driver()
|
||||
|
||||
Reference in New Issue
Block a user