TTS_language defined
tts_cz fixed to play 0.0x numbers correctly CZ system and custom promts shifted to 260+
This commit is contained in:
@@ -281,6 +281,9 @@ EXTRAINCDIRS = . translations
|
||||
|
||||
CPPDEFS += -DTRANSLATIONS_$(TRANSLATIONS)
|
||||
|
||||
# TTS language
|
||||
CPPDEFS += -DTTS_$(TTS)
|
||||
|
||||
ifeq ($(UNITS), IMPERIAL)
|
||||
CPPDEFS += -DIMPERIAL_UNITS
|
||||
endif
|
||||
|
||||
@@ -1886,7 +1886,11 @@ void evalFunctions()
|
||||
if (tmr10ms - s_last_play >= 100) {
|
||||
s_last_play = tmr10ms;
|
||||
if (sd->func == FUNC_PLAY_TRACK)
|
||||
#if defined(TTS_CZ) && defined(PCBSTD)
|
||||
putVoiceQueueUpper(PROMPT_CUSTOM_BASE+sd->param);
|
||||
#else
|
||||
pushPrompt(PROMPT_CUSTOM_BASE+sd->param);
|
||||
#endif
|
||||
else
|
||||
playValue(sd->param);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,16 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_WARNING2() audioDefevent(AU_WARNING2)
|
||||
#define AUDIO_ERROR() audioDefevent(AU_ERROR)
|
||||
#if defined(VOICE)
|
||||
#if defined(TTS_CZ) && defined(PCBSTD)
|
||||
#define AUDIO_TADA() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TADA)
|
||||
#define AUDIO_TX_BATTERY_LOW() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TX_BATTERY_LOW)
|
||||
#define AUDIO_INACTIVITY() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_INACTIVITY)
|
||||
#define AUDIO_ERROR_MESSAGE(e) putVoiceQueueUpper(PROMPT_SYSTEM_BASE+e)
|
||||
#define AUDIO_TIMER_30() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TIMER_30)
|
||||
#define AUDIO_TIMER_20() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TIMER_20)
|
||||
#define AUDIO_TIMER_10() putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TIMER_10)
|
||||
#define AUDIO_TIMER_LT3(x) putVoiceQueueUpper(PROMPT_SYSTEM_BASE+AU_TIMER_LT3)
|
||||
#else
|
||||
#define AUDIO_TADA() pushPrompt(PROMPT_SYSTEM_BASE+AU_TADA)
|
||||
#define AUDIO_TX_BATTERY_LOW() pushPrompt(PROMPT_SYSTEM_BASE+AU_TX_BATTERY_LOW)
|
||||
#define AUDIO_INACTIVITY() pushPrompt(PROMPT_SYSTEM_BASE+AU_INACTIVITY)
|
||||
@@ -126,6 +136,7 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_TIMER_20() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_20)
|
||||
#define AUDIO_TIMER_10() pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_10)
|
||||
#define AUDIO_TIMER_LT3(x) pushPrompt(PROMPT_SYSTEM_BASE+AU_TIMER_LT3)
|
||||
#endif
|
||||
#else
|
||||
#define AUDIO_TADA()
|
||||
#define AUDIO_TX_BATTERY_LOW() audioDefevent(AU_TX_BATTERY_LOW)
|
||||
|
||||
+8
-1
@@ -48,8 +48,13 @@
|
||||
#define V_WAIT_BUSY_OFF 4
|
||||
#define V_WAIT_BUSY_DELAY 5
|
||||
|
||||
#if defined(TTS_CZ) && defined(PCBSTD)
|
||||
#define PROMPT_SYSTEM_BASE 0
|
||||
#define PROMPT_CUSTOM_BASE 40
|
||||
#else
|
||||
#define PROMPT_SYSTEM_BASE 170
|
||||
#define PROMPT_CUSTOM_BASE 200
|
||||
#endif
|
||||
|
||||
struct t_voice
|
||||
{
|
||||
@@ -67,7 +72,9 @@ struct t_voice
|
||||
|
||||
void voice_process( void ) ;
|
||||
};
|
||||
|
||||
#if defined(TTS_CZ)
|
||||
extern void putVoiceQueueUpper( uint8_t value );
|
||||
#endif
|
||||
extern void pushPrompt( uint8_t value );
|
||||
extern struct t_voice *voiceaddress( void ) ;
|
||||
extern struct t_voice Voice ;
|
||||
|
||||
@@ -132,11 +132,17 @@ void playNumber(int16_t number, uint8_t unit, uint8_t att)
|
||||
|
||||
int8_t mode = MODE(att);
|
||||
if (mode > 0) {
|
||||
div_t qr = div(number, (mode == 1 ? 10 : 100));
|
||||
playNumber(qr.quot);
|
||||
pushUnitPrompt(qr.quot,PROMPT_CELA);
|
||||
playNumber(qr.rem,0,ZENSKY);
|
||||
pushPrompt(PROMPT_UNITS_BASE+((unit-1)*4)+3);
|
||||
div_t qr = div(number, (mode == 1 ? 10 : 100));
|
||||
if (qr.rem) {
|
||||
playNumber(qr.quot);
|
||||
pushUnitPrompt(qr.quot,PROMPT_CELA);
|
||||
if (mode != 1 && qr.rem < 10)
|
||||
pushPrompt (PROMPT_NULA);
|
||||
playNumber(qr.rem,0,ZENSKY);
|
||||
pushPrompt(PROMPT_UNITS_BASE+((unit-1)*4)+3);
|
||||
}
|
||||
else
|
||||
playNumber(qr.quot, unit);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user