diff --git a/radio/src/translations.h b/radio/src/translations.h index 952c6aad5..69207f82d 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -626,7 +626,7 @@ extern const pm_char STR_EEBACKUP[]; const char *id; const char *name; void (*playNumber)(getvalue_t number, uint8_t unit, uint8_t flags, uint8_t id); - void (*playDuration)(int16_t seconds, uint8_t flags, uint8_t id); + void (*playDuration)(int seconds, uint8_t flags, uint8_t id); }; extern LanguagePack * languagePacks[]; extern LanguagePack * currentLanguagePack; @@ -634,10 +634,10 @@ extern const pm_char STR_EEBACKUP[]; #define LANGUAGE_PACK_DECLARE(lng, name) LanguagePack lng ## LanguagePack = { #lng, name, lng ## _ ## playNumber, lng ## _ ## playDuration } #define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name) LANGUAGE_PACK_DECLARE(lng, name); LanguagePack * currentLanguagePack = & lng ## LanguagePack; uint8_t currentLanguagePackIdx inline PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t flags) { currentLanguagePack->playNumber(number, unit, flags, id); } - inline PLAY_FUNCTION(playDuration, int16_t seconds, uint8_t flags) { currentLanguagePack->playDuration(seconds, flags, id); } + inline PLAY_FUNCTION(playDuration, int seconds, uint8_t flags) { currentLanguagePack->playDuration(seconds, flags, id); } #elif defined(VOICE) PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att); - PLAY_FUNCTION(playDuration, int16_t seconds); + PLAY_FUNCTION(playDuration, int seconds); #define LANGUAGE_PACK_DECLARE(lng, name) #define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name) #else diff --git a/radio/src/translations/tts_cz.cpp b/radio/src/translations/tts_cz.cpp index 9440c725b..34198b0d4 100644 --- a/radio/src/translations/tts_cz.cpp +++ b/radio/src/translations/tts_cz.cpp @@ -219,7 +219,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(cz, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(cz, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(CZ_PROMPT_MINUS); diff --git a/radio/src/translations/tts_de.cpp b/radio/src/translations/tts_de.cpp index bb7e88f08..c32a1e937 100644 --- a/radio/src/translations/tts_de.cpp +++ b/radio/src/translations/tts_de.cpp @@ -168,7 +168,7 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(de, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(de, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(DE_PROMPT_MINUS); diff --git a/radio/src/translations/tts_en.cpp b/radio/src/translations/tts_en.cpp index 8d30536d7..5bf788b04 100644 --- a/radio/src/translations/tts_en.cpp +++ b/radio/src/translations/tts_en.cpp @@ -151,7 +151,7 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(en, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(EN_PROMPT_MINUS); diff --git a/radio/src/translations/tts_es.cpp b/radio/src/translations/tts_es.cpp index c0993e16d..b77972c35 100644 --- a/radio/src/translations/tts_es.cpp +++ b/radio/src/translations/tts_es.cpp @@ -190,7 +190,7 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(es, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(ES_PROMPT_MENO); diff --git a/radio/src/translations/tts_fr.cpp b/radio/src/translations/tts_fr.cpp index 31ede7b62..78d7beb28 100644 --- a/radio/src/translations/tts_fr.cpp +++ b/radio/src/translations/tts_fr.cpp @@ -176,7 +176,7 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(fr, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(FR_PROMPT_MOINS); @@ -210,7 +210,7 @@ I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds PLAY_DURATION_ATT) } } - if (seconds > 0) { + if (!IS_PLAY_TIME() && seconds > 0) { PLAY_NUMBER(seconds, 0, FEMININ); PUSH_NUMBER_PROMPT(FR_PROMPT_SECONDE); } diff --git a/radio/src/translations/tts_it.cpp b/radio/src/translations/tts_it.cpp index 45630cdda..a6a0dfedd 100644 --- a/radio/src/translations/tts_it.cpp +++ b/radio/src/translations/tts_it.cpp @@ -164,7 +164,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(it, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(IT_PROMPT_MENO); diff --git a/radio/src/translations/tts_pl.cpp b/radio/src/translations/tts_pl.cpp index 096e81e30..949ff6ba2 100644 --- a/radio/src/translations/tts_pl.cpp +++ b/radio/src/translations/tts_pl.cpp @@ -239,7 +239,7 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att) // The whole funtion has to be changed -I18N_PLAY_FUNCTION(pl, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(pl, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(PL_PROMPT_MINUS); diff --git a/radio/src/translations/tts_pt.cpp b/radio/src/translations/tts_pt.cpp index b3c4ce0bd..c00553bef 100644 --- a/radio/src/translations/tts_pt.cpp +++ b/radio/src/translations/tts_pt.cpp @@ -175,7 +175,7 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(pt, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(pt, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(PT_PROMPT_MENOS); diff --git a/radio/src/translations/tts_se.cpp b/radio/src/translations/tts_se.cpp index df1f6e9f0..82b362908 100644 --- a/radio/src/translations/tts_se.cpp +++ b/radio/src/translations/tts_se.cpp @@ -141,7 +141,7 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(se, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(se, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(SE_PROMPT_MINUS); diff --git a/radio/src/translations/tts_sk.cpp b/radio/src/translations/tts_sk.cpp index 2b6951e3f..2fd673b32 100644 --- a/radio/src/translations/tts_sk.cpp +++ b/radio/src/translations/tts_sk.cpp @@ -235,7 +235,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } } -I18N_PLAY_FUNCTION(sk, playDuration, int16_t seconds PLAY_DURATION_ATT) +I18N_PLAY_FUNCTION(sk, playDuration, int seconds PLAY_DURATION_ATT) { if (seconds < 0) { PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS);