Switch to CMake
This commit is contained in:
+51
-18
@@ -597,11 +597,11 @@ extern const pm_char STR_CURRENT[];
|
||||
|
||||
#if defined(NAVIGATION_MENUS)
|
||||
extern const pm_char STR_SELECT_MODEL[];
|
||||
extern const pm_char STR_CREATE_CATEGORY[];
|
||||
extern const pm_char STR_RENAME_CATEGORY[];
|
||||
extern const pm_char STR_DELETE_CATEGORY[];
|
||||
extern const pm_char STR_CREATE_CATEGORY[];
|
||||
extern const pm_char STR_RENAME_CATEGORY[];
|
||||
extern const pm_char STR_DELETE_CATEGORY[];
|
||||
extern const pm_char STR_CREATE_MODEL[];
|
||||
extern const pm_char STR_DUPLICATE_MODEL[];
|
||||
extern const pm_char STR_DUPLICATE_MODEL[];
|
||||
extern const pm_char STR_COPY_MODEL[];
|
||||
extern const pm_char STR_MOVE_MODEL[];
|
||||
extern const pm_char STR_DELETE_MODEL[];
|
||||
@@ -669,10 +669,10 @@ extern const pm_char STR_NO_SOUNDS_ON_SD[];
|
||||
extern const pm_char STR_NO_MODELS_ON_SD[];
|
||||
extern const pm_char STR_NO_BITMAPS_ON_SD[];
|
||||
extern const pm_char STR_NO_SCRIPTS_ON_SD[];
|
||||
extern const pm_char STR_SCRIPT_SYNTAX_ERROR[];
|
||||
extern const pm_char STR_SCRIPT_PANIC[];
|
||||
extern const pm_char STR_SCRIPT_KILLED[];
|
||||
extern const pm_char STR_SCRIPT_ERROR[];
|
||||
extern const pm_char STR_SCRIPT_SYNTAX_ERROR[];
|
||||
extern const pm_char STR_SCRIPT_PANIC[];
|
||||
extern const pm_char STR_SCRIPT_KILLED[];
|
||||
extern const pm_char STR_SCRIPT_ERROR[];
|
||||
extern const pm_char STR_PLAY_FILE[];
|
||||
extern const pm_char STR_ASSIGN_BITMAP[];
|
||||
extern const pm_char STR_EXECUTE_FILE[];
|
||||
@@ -724,15 +724,48 @@ extern const pm_char STR_BLCOLOR[];
|
||||
#endif
|
||||
|
||||
struct LanguagePack {
|
||||
const char *id;
|
||||
const char *name;
|
||||
const char * id;
|
||||
const char * name;
|
||||
void (*playNumber)(getvalue_t number, uint8_t unit, uint8_t flags, uint8_t id);
|
||||
void (*playDuration)(int seconds, uint8_t flags, uint8_t id);
|
||||
};
|
||||
extern const LanguagePack * LP_CONST languagePacks[];
|
||||
|
||||
extern const LanguagePack * currentLanguagePack;
|
||||
extern uint8_t currentLanguagePackIdx;
|
||||
|
||||
extern LP_CONST LanguagePack czLanguagePack;
|
||||
extern LP_CONST LanguagePack enLanguagePack;
|
||||
extern LP_CONST LanguagePack esLanguagePack;
|
||||
extern LP_CONST LanguagePack frLanguagePack;
|
||||
extern LP_CONST LanguagePack deLanguagePack;
|
||||
extern LP_CONST LanguagePack itLanguagePack;
|
||||
extern LP_CONST LanguagePack plLanguagePack;
|
||||
extern LP_CONST LanguagePack ptLanguagePack;
|
||||
extern LP_CONST LanguagePack skLanguagePack;
|
||||
extern LP_CONST LanguagePack seLanguagePack;
|
||||
extern LP_CONST LanguagePack huLanguagePack;
|
||||
|
||||
static const LanguagePack * LP_CONST languagePacks[] = {
|
||||
// alphabetical order
|
||||
&czLanguagePack,
|
||||
&deLanguagePack,
|
||||
&enLanguagePack,
|
||||
&esLanguagePack,
|
||||
&frLanguagePack,
|
||||
&huLanguagePack,
|
||||
&itLanguagePack,
|
||||
&plLanguagePack,
|
||||
&ptLanguagePack,
|
||||
&seLanguagePack,
|
||||
&skLanguagePack,
|
||||
NULL
|
||||
};
|
||||
|
||||
#if defined(SIMU)
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name) LP_CONST LanguagePack lng ## LanguagePack = { #lng, name, lng ## _ ## playNumber, lng ## _ ## playDuration }
|
||||
#else
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name) extern LP_CONST LanguagePack lng ## LanguagePack = { #lng, name, lng ## _ ## playNumber, lng ## _ ## playDuration }
|
||||
#endif
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name) LANGUAGE_PACK_DECLARE(lng, name); const 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, int seconds, uint8_t flags) { currentLanguagePack->playDuration(seconds, flags, id); }
|
||||
@@ -773,7 +806,7 @@ extern const pm_char STR_BLCOLOR[];
|
||||
extern const pm_char STR_PREFLIGHT[];
|
||||
extern const pm_char STR_CHECKLIST[];
|
||||
extern const pm_char STR_VIEW_NOTES[];
|
||||
extern const pm_char STR_MODEL_SELECT[];
|
||||
extern const pm_char STR_MODEL_SELECT[];
|
||||
extern const pm_char STR_RESET_SUBMENU[];
|
||||
extern const pm_char STR_LOWALARM[];
|
||||
extern const pm_char STR_CRITICALALARM[];
|
||||
@@ -800,10 +833,10 @@ extern const pm_char STR_MODEL_SELECT[];
|
||||
extern const pm_char STR_TELEMETRYFULL[];
|
||||
extern const pm_char STR_INVERTED_SERIAL[];
|
||||
extern const pm_char STR_IGNORE_INSTANCE[];
|
||||
extern const pm_char STR_DISCOVER_SENSORS[];
|
||||
extern const pm_char STR_DISCOVER_SENSORS[];
|
||||
extern const pm_char STR_STOP_DISCOVER_SENSORS[];
|
||||
extern const pm_char STR_DELETE_ALL_SENSORS[];
|
||||
extern const pm_char STR_CONFIRMDELETE[];
|
||||
extern const pm_char STR_CONFIRMDELETE[];
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBFLAMENCO) || defined(PCBHORUS)
|
||||
@@ -823,10 +856,10 @@ extern const pm_char STR_MODEL_SELECT[];
|
||||
extern const pm_char STR_SMOOTH[];
|
||||
extern const pm_char STR_COPY_STICKS_TO_OFS[];
|
||||
extern const pm_char STR_COPY_TRIMS_TO_OFS[];
|
||||
extern const pm_char STR_INCDEC[];
|
||||
extern const pm_char STR_GLOBALVAR[];
|
||||
extern const pm_char STR_MIXSOURCE[];
|
||||
extern const pm_char STR_CONSTANT[];
|
||||
extern const pm_char STR_INCDEC[];
|
||||
extern const pm_char STR_GLOBALVAR[];
|
||||
extern const pm_char STR_MIXSOURCE[];
|
||||
extern const pm_char STR_CONSTANT[];
|
||||
extern const pm_char STR_TOP_BAR[];
|
||||
extern const pm_char STR_ALTITUDE[];
|
||||
extern const pm_char STR_SCALE[];
|
||||
|
||||
Reference in New Issue
Block a user