From 96371bd27d9328bc006f3d37a386a2595ed01694 Mon Sep 17 00:00:00 2001 From: "bsongis@gmail.com" Date: Sat, 11 May 2013 17:52:14 +0000 Subject: [PATCH] [Taranis/sky9x] Bug in languages (thanks Martin!) --- src/translations/tts_cz.cpp | 10 ++++------ src/translations/tts_en.cpp | 10 ++++------ src/translations/tts_sk.cpp | 10 ++++------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/translations/tts_cz.cpp b/src/translations/tts_cz.cpp index 2bff413d0..b0636c6c6 100644 --- a/src/translations/tts_cz.cpp +++ b/src/translations/tts_cz.cpp @@ -88,12 +88,10 @@ enum CzechPrompts { #if defined(VOICE) -#if not defined PUSH_UNIT_PROMPT #if defined(CPUARM) - #define PUSH_UNIT_PROMPT(p, u) cz_pushUnitPrompt((p), (u), id) + #define CZ_PUSH_UNIT_PROMPT(p, u) cz_pushUnitPrompt((p), (u), id) #else - #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#endif + #define CZ_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif #define MUZSKY 0x80 @@ -138,7 +136,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (qr.quot == 0) PUSH_NUMBER_PROMPT(CZ_PROMPT_CELA); else - PUSH_UNIT_PROMPT(qr.quot, CZ_PROMPT_CELA); + CZ_PUSH_UNIT_PROMPT(qr.quot, CZ_PROMPT_CELA); PLAY_NUMBER(qr.rem, 0, ZENSKY); PUSH_NUMBER_PROMPT(CZ_PROMPT_UNITS_BASE+((unit-1)*4)+3); return; @@ -208,7 +206,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } if (unit) { - PUSH_UNIT_PROMPT(tmp, (CZ_PROMPT_UNITS_BASE+((unit-1)*4))); + CZ_PUSH_UNIT_PROMPT(tmp, (CZ_PROMPT_UNITS_BASE+((unit-1)*4))); } } diff --git a/src/translations/tts_en.cpp b/src/translations/tts_en.cpp index 8cabaa55e..05a0d71f7 100644 --- a/src/translations/tts_en.cpp +++ b/src/translations/tts_en.cpp @@ -72,15 +72,13 @@ enum EnglishPrompts { #if defined(VOICE) -#if not defined PUSH_UNIT_PROMPT #if defined(CPUARM) - #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u), id) + #define EN_PUSH_UNIT_PROMPT(p, u) en_pushUnitPrompt((p), (u), id) #else - #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#endif + #define EN_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif -PLAY_FUNCTION(pushUnitPrompt, int16_t number, uint8_t unitprompt) +I18N_PLAY_FUNCTION(en, pushUnitPrompt, int16_t number, uint8_t unitprompt) { if (number == 1) PUSH_NUMBER_PROMPT(unitprompt); @@ -140,7 +138,7 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } if (unit) { - PUSH_UNIT_PROMPT(tmp, (+((unit-1)*2))); + EN_PUSH_UNIT_PROMPT(tmp, (+((unit-1)*2))); } } diff --git a/src/translations/tts_sk.cpp b/src/translations/tts_sk.cpp index ff47dabad..39b23d6ea 100644 --- a/src/translations/tts_sk.cpp +++ b/src/translations/tts_sk.cpp @@ -103,12 +103,10 @@ enum SlovakPrompts { #if defined(VOICE) -#if not defined PUSH_UNIT_PROMPT #if defined(CPUARM) -#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u), id) + #define SK_PUSH_UNIT_PROMPT(p, u) sk_pushUnitPrompt((p), (u), id) #else -#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#endif + #define SK_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif #define MUZSKY 0x80 @@ -153,7 +151,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (qr.quot == 0) PUSH_NUMBER_PROMPT(SK_PROMPT_CELA); else - PUSH_UNIT_PROMPT(qr.quot, SK_PROMPT_CELA); + SK_PUSH_UNIT_PROMPT(qr.quot, SK_PROMPT_CELA); PLAY_NUMBER(qr.rem, 0, ZENSKY); PUSH_NUMBER_PROMPT(SK_PROMPT_UNITS_BASE+((unit-1)*4)+3); return; @@ -224,7 +222,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att) } if (unit) { - PUSH_UNIT_PROMPT(tmp, (SK_PROMPT_UNITS_BASE+((unit-1)*4))); + SK_PUSH_UNIT_PROMPT(tmp, (SK_PROMPT_UNITS_BASE+((unit-1)*4))); } }