diff --git a/README.md b/README.md index cb731c8d..0a62158c 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ OpenRTX was created by: - Federico Amedeo Izzo IU2NUO - Frederik Saraci IU2NRO +Our wholehearted thanks to the contributions from the community: + +- Joseph Stephen VK7JS, which implemented voice prompts + All this was made possible by the huge reverse engineering effort of Travis Goodspeed and all the contributors of [md380tools](https://github.com/travisgoodspeed/md380tools). A huge thank goes to Roger Clark, and his [OpenGD77](https://github.com/rogerclarkmelbourne/OpenGD77) which not only inspired this project, but as a precursor, provided a working code example for the GD77 radio family. diff --git a/openrtx/include/ui/UIStrings.h b/openrtx/include/ui/UIStrings.h new file mode 100644 index 00000000..8ad97ea6 --- /dev/null +++ b/openrtx/include/ui/UIStrings.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2022 by Federico Amedeo Izzo IU2NUO, * + * Niccolò Izzo IU2KIN * + * Frederik Saraci IU2NRO * + * Silvano Seva IU2KWO * + * Joseph Stephen VK7JS * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, see * + ***************************************************************************/ +/* +This string table's order must not be altered as voice prompts will be indexed in the same order as these strings. +*/ +#define NUM_LANGUAGES 1 + +typedef struct +{ + const char* languageName; + const char* off; + const char* on; +} stringsTable_t; + +const stringsTable_t englishStrings = +{ + .languageName="English", + .off = "OFF", + .on="ON", +}; + +const stringsTable_t languages[NUM_LANGUAGES]={englishStrings}; // add more languages here. +const stringsTable_t* currentLanguage=&languages[0]; // default to English. + diff --git a/openrtx/src/ui/ui_menu.c b/openrtx/src/ui/ui_menu.c index c6716cc0..3cde3984 100644 --- a/openrtx/src/ui/ui_menu.c +++ b/openrtx/src/ui/ui_menu.c @@ -28,6 +28,7 @@ #include #include #include +#include /* UI main screen helper functions, their implementation is in "ui_main.c" */ extern void _ui_drawMainBottom(); @@ -185,10 +186,10 @@ int _ui_getSettingsGPSValueName(char *buf, uint8_t max_len, uint8_t index) switch(index) { case G_ENABLED: - snprintf(buf, max_len, "%s", (last_state.settings.gps_enabled) ? "ON" : "OFF"); + snprintf(buf, max_len, "%s", (last_state.settings.gps_enabled) ? currentLanguage->on : currentLanguage->off); break; case G_SET_TIME: - snprintf(buf, max_len, "%s", (last_state.gps_set_time) ? "ON" : "OFF"); + snprintf(buf, max_len, "%s", (last_state.gps_set_time) ? currentLanguage->on : currentLanguage->off); break; case G_TIMEZONE: // Add + prefix to positive numbers diff --git a/requirements.txt b/requirements.txt index fb375e36..d2a958ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pyusb meson +ffmpeg