[Taranis] SWR implemented with popup when SWR > 0x33 (Tx antenna problem)

[Taranis] RSSI/A1/A2 alarms
[Taranis] Better code when no pulses sent (internal or external module). Thanks Mike!
[Taranis] Correction on DEBUG serial code
This commit is contained in:
bsongis@gmail.com
2013-05-15 07:57:21 +00:00
parent a4cfa395a8
commit 90be0bae10
19 changed files with 356 additions and 302 deletions
+49 -13
View File
@@ -56,8 +56,10 @@ uint16_t Sine_values[] =
const char * audioFilenames[] = {
"inactiv",
"lowbatt",
#if defined(PCBSKY9X)
"highmah",
"hightemp",
#endif
"thralert",
"swalert",
"eebad",
@@ -80,10 +82,18 @@ const char * audioFilenames[] = {
"timerlt3",
"timer10",
"timer20",
"timer30"
"timer30",
#if defined(PCBTARANIS)
"a1_org",
"a1_red",
"a2_org",
"a2_red",
"rssi_org",
"rssi_red",
"swr_red",
#endif
};
uint32_t sdAvailableSystemAudioFiles = 0;
uint8_t sdAvailablePhaseAudioFiles[MAX_PHASES] = { 0 };
uint8_t sdAvailableMixerAudioFiles[MAX_MIXERS] = { 0 };
@@ -740,6 +750,7 @@ void audioEvent(uint8_t e, uint8_t f)
audioQueue.play(160, 40, 6, 2, -1);
}
break;
#if defined(PCBSKY9X)
case AU_TX_MAH_HIGH:
if (!audioQueue.busy()) {
// TODO Rob something better here?
@@ -754,7 +765,7 @@ void audioEvent(uint8_t e, uint8_t f)
audioQueue.play(160, 40, 6, 2, -1);
}
break;
// error
#endif
#if defined(VOICE)
case AU_THROTTLE_ALERT:
case AU_SWITCH_ALERT:
@@ -814,22 +825,47 @@ void audioEvent(uint8_t e, uint8_t f)
case AU_MIX_WARNING_3:
audioQueue.play(BEEP_DEFAULT_FREQ+112, 12, 8, PLAY_REPEAT(2));
break;
// time 30 seconds left
case AU_TIMER_30:
audioQueue.play(BEEP_DEFAULT_FREQ, 30, 6, PLAY_REPEAT(2)|PLAY_NOW);
break;
// time 20 seconds left
case AU_TIMER_20:
audioQueue.play(BEEP_DEFAULT_FREQ, 30, 6, PLAY_REPEAT(1)|PLAY_NOW);
// time <3 seconds left
case AU_TIMER_LT3:
audioQueue.play(BEEP_DEFAULT_FREQ+10, 30, 6, PLAY_NOW);
break;
// time 10 seconds left
case AU_TIMER_10:
audioQueue.play(BEEP_DEFAULT_FREQ, 30, 6, PLAY_NOW);
break;
// time <3 seconds left
case AU_TIMER_LT3:
audioQueue.play(BEEP_DEFAULT_FREQ+10, 30, 6, PLAY_NOW);
// time 20 seconds left
case AU_TIMER_20:
audioQueue.play(BEEP_DEFAULT_FREQ, 30, 6, PLAY_REPEAT(1)|PLAY_NOW);
break;
// time 30 seconds left
case AU_TIMER_30:
audioQueue.play(BEEP_DEFAULT_FREQ, 30, 6, PLAY_REPEAT(2)|PLAY_NOW);
break;
#if defined(PCBTARANIS)
case AU_A1_ORANGE:
audioQueue.play(BEEP_DEFAULT_FREQ+40, 30, 6, PLAY_NOW);
break;
case AU_A1_RED:
audioQueue.play(BEEP_DEFAULT_FREQ+40, 30, 6, PLAY_REPEAT(1)|PLAY_NOW);
break;
case AU_A2_ORANGE:
audioQueue.play(BEEP_DEFAULT_FREQ+80, 30, 6, PLAY_NOW);
break;
case AU_A2_RED:
audioQueue.play(BEEP_DEFAULT_FREQ+80, 30, 6, PLAY_REPEAT(1)|PLAY_NOW);
break;
case AU_RSSI_ORANGE:
audioQueue.play(BEEP_DEFAULT_FREQ+120, 30, 6, PLAY_NOW);
break;
case AU_RSSI_RED:
audioQueue.play(BEEP_DEFAULT_FREQ+120, 30, 6, PLAY_REPEAT(1)|PLAY_NOW);
break;
case AU_SWR_RED:
// siren
audioQueue.play(20, 40, 10, 2, 1);
audioQueue.pause(200);
break;
#endif
case AU_FRSKY_BEEP1:
audioQueue.play(BEEP_DEFAULT_FREQ, 15, 2);
audioQueue.pause(200);