From e691f37f88931e9e3079160c6a513de0d7bc8d6e Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Thu, 12 May 2022 16:06:29 +1000 Subject: [PATCH] Extracted and added a few more strings to the string table and created voice prompts for those strings. --- openrtx/include/ui/EnglishStrings.h | 2 ++ openrtx/include/ui/UIStrings.h | 2 ++ openrtx/src/ui/ui.c | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/openrtx/include/ui/EnglishStrings.h b/openrtx/include/ui/EnglishStrings.h index bbf83b8c..2b3270ab 100644 --- a/openrtx/include/ui/EnglishStrings.h +++ b/openrtx/include/ui/EnglishStrings.h @@ -80,5 +80,7 @@ const stringsTable_t englishStrings = .toReset = "To reset:", .pressEnterTwice = "Press Enter twice", .macroMenu = "Macro Menu", + .forEmergencyUse = "For emergency use", + .pressAnyButton = "press any button.", }; #endif //EnglishStrings_h_included diff --git a/openrtx/include/ui/UIStrings.h b/openrtx/include/ui/UIStrings.h index 701829cf..4af9af45 100644 --- a/openrtx/include/ui/UIStrings.h +++ b/openrtx/include/ui/UIStrings.h @@ -85,6 +85,8 @@ typedef struct const char* toReset; const char* pressEnterTwice; const char* macroMenu; + const char* forEmergencyUse; + const char* pressAnyButton; } stringsTable_t; extern const stringsTable_t languages[]; diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index c88e67b9..905ebcb2 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -423,7 +423,7 @@ void ui_drawSplashScreen(bool centered) splash_origin.y = SCREEN_HEIGHT / 2 + 6; else splash_origin.y = SCREEN_HEIGHT / 4; - gfx_print(splash_origin, FONT_SIZE_12PT, TEXT_ALIGN_CENTER, yellow_fab413, "OpenRTX"); + gfx_print(splash_origin, FONT_SIZE_12PT, TEXT_ALIGN_CENTER, yellow_fab413, currentLanguage->openRTX); #else if(centered) splash_origin.y = SCREEN_HEIGHT / 2 - 6; @@ -447,12 +447,12 @@ void _ui_drawLowBatteryScreen() FONT_SIZE_6PT, TEXT_ALIGN_CENTER, color_white, - "For emergency use"); + currentLanguage->forEmergencyUse); gfx_print(text_pos_2, FONT_SIZE_6PT, TEXT_ALIGN_CENTER, color_white, - "press any button."); + currentLanguage->pressAnyButton); } freq_t _ui_freq_add_digit(freq_t freq, uint8_t pos, uint8_t number)