No more TADA (when no VOICE / SD card of course)
This commit is contained in:
@@ -79,6 +79,8 @@ const char * audioFilenames[] = {
|
||||
uint32_t sdAvailableAudioFiles;
|
||||
|
||||
#if defined(SDCARD)
|
||||
// TODO enable the assert when it's C++
|
||||
extern "C" {
|
||||
void retrieveAvailableAudioFiles()
|
||||
{
|
||||
FILINFO info;
|
||||
@@ -98,6 +100,7 @@ void retrieveAvailableAudioFiles()
|
||||
sdAvailableAudioFiles |= ((uint32_t)1 << i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline bool isAudioFileAvailable(uint8_t i, char * filename)
|
||||
{
|
||||
@@ -556,12 +559,6 @@ void audioEvent(uint8_t e, uint8_t f)
|
||||
case AU_WARNING3:
|
||||
audioQueue.play(BEEP_DEFAULT_FREQ, 50, 2, PLAY_NOW);
|
||||
break;
|
||||
// startup tune
|
||||
case AU_TADA:
|
||||
audioQueue.play(50, 20, 10);
|
||||
audioQueue.play(90, 20, 10);
|
||||
audioQueue.play(110, 10, 8, 2);
|
||||
break;
|
||||
// pot/stick center
|
||||
case AU_POT_STICK_MIDDLE:
|
||||
audioQueue.play(BEEP_DEFAULT_FREQ + 50, 20, 2, PLAY_NOW);
|
||||
|
||||
@@ -103,8 +103,6 @@ class AudioQueue {
|
||||
extern AudioQueue audioQueue;
|
||||
|
||||
void alawInit();
|
||||
extern "C" void retrieveAvailableAudioFiles();
|
||||
|
||||
void audioEvent(uint8_t e, uint8_t f=BEEP_DEFAULT_FREQ);
|
||||
|
||||
#define AUDIO_TADA() audioEvent(AU_TADA)
|
||||
|
||||
@@ -809,6 +809,8 @@ void sdInit()
|
||||
|
||||
uint8_t sdErrorCount = 0;
|
||||
FATFS g_FATFS_Obj;
|
||||
void retrieveAvailableAudioFiles();
|
||||
|
||||
void sdPoll10mS()
|
||||
{
|
||||
if (!CardIsConnected()) {
|
||||
|
||||
@@ -221,12 +221,6 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
case AU_WARNING3:
|
||||
play(BEEP_DEFAULT_FREQ, 30, 1, PLAY_NOW);
|
||||
break;
|
||||
// startup tune
|
||||
case AU_TADA:
|
||||
play(50, 10, 5);
|
||||
play(90, 10, 5);
|
||||
play(110, 5, 4, 2);
|
||||
break;
|
||||
// pot/stick center
|
||||
case AU_POT_STICK_MIDDLE:
|
||||
play(BEEP_DEFAULT_FREQ + 50, 10, 1, PLAY_NOW);
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_TIMER_10() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_10)
|
||||
#define AUDIO_TIMER_LT3(x) pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_LT3)
|
||||
#else
|
||||
#define AUDIO_TADA() audioDefevent(AU_TADA)
|
||||
#define AUDIO_TADA()
|
||||
#define AUDIO_TX_BATTERY_LOW() audioDefevent(AU_TX_BATTERY_LOW)
|
||||
#define AUDIO_INACTIVITY() audioDefevent(AU_INACTIVITY)
|
||||
#define AUDIO_ERROR_MESSAGE(e) audioDefevent(AU_ERROR)
|
||||
|
||||
Reference in New Issue
Block a user