Skip to content

Commit

Permalink
Remove not used translations from firmware (#443)
Browse files Browse the repository at this point in the history
* removed not used translations
* remove DATETIME translation
* exclude VKEYS for non MENU_DIAG_ANAS_KEYS builds
* exclude SLIDERTYPES when NUM_SLIDERS == 0
  • Loading branch information
ajjjjjjjj authored Dec 12, 2024
1 parent c861ac8 commit bec9456
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
13 changes: 6 additions & 7 deletions radio/src/translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const char STR_OPEN9X[] =
ISTR(AUX_SERIAL_MODES)
ISTR(SWTYPES)
ISTR(POTTYPES)
#if NUM_SLIDERS > 0
ISTR(SLIDERTYPES)
#endif
#endif
ISTR(VTRIMINC)
ISTR(VDISPLAYTRIMS)
Expand All @@ -60,26 +62,26 @@ const char STR_OPEN9X[] =
ISTR(VFSWRESET)
ISTR(FUNCSOUNDS)
ISTR(VTELEMUNIT)
ISTR(VALARM)
ISTR(VALARMFN)
ISTR(VTELPROTO)
#if !defined(PCBI6X)
ISTR(GPSFORMAT)
ISTR(AMPSRC)
#endif
ISTR(VARIOSRC)
ISTR(VTELEMSCREENTYPE)
#if defined(HELI)
ISTR(VSWASHTYPE)
#endif
#if defined(MENU_DIAG_ANAS_KEYS)
ISTR(VKEYS)
#endif
ISTR(VSWITCHES)
ISTR(VSRCRAW)
#if defined(TRANSLATIONS_CZ)
ISTR(INPUTNAMES)
#endif
ISTR(VTMRMODES)
#if defined(RTCCLOCK)
ISTR(DATETIME)
#endif
ISTR(VPERSISTENT)
#if !defined(PCBI6X)
ISTR(VLCD)
Expand All @@ -99,16 +101,13 @@ const char STR_OPEN9X[] =
ISTR(R9M_FCC_POWER_VALUES)
ISTR(R9M_LBT_POWER_VALUES)
ISTR(TELEMETRY_PROTOCOLS)
#endif
#if !defined(PCBI6X)
ISTR(XJT_PROTOCOLS)
ISTR(DSM_PROTOCOLS)
#endif
ISTR(I6X_PROTOCOLS)
#if defined(MULTIMODULE)
ISTR(MULTI_PROTOCOLS)
#endif
ISTR(VOLTSRC)
ISTR(CURVE_TYPES)
ISTR(CRSF_ARMING_MODES)
ISTR(VSENSORTYPES)
Expand Down
27 changes: 15 additions & 12 deletions radio/src/translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ extern const char STR_OPEN9X[];
#define OFS_SWTYPES (OFS_AUX_SERIAL_MODES + sizeof(TR_AUX_SERIAL_MODES))
#define OFS_POTTYPES (OFS_SWTYPES + sizeof(TR_SWTYPES))
#define OFS_SLIDERTYPES (OFS_POTTYPES + sizeof(TR_POTTYPES))
#if NUM_SLIDERS > 0
#define OFS_VTRIMINC (OFS_SLIDERTYPES + sizeof(TR_SLIDERTYPES))
#else
#define OFS_VTRIMINC (OFS_SLIDERTYPES)
#endif
#else
#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
#endif
Expand All @@ -156,25 +160,23 @@ extern const char STR_OPEN9X[];
#define OFS_FUNCSOUNDS (OFS_VFSWRESET + sizeof(TR_VFSWRESET))
#define OFS_VTELEMCHNS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
#define OFS_VTELEMUNIT (OFS_VTELEMCHNS)
#define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
#define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM))
#define OFS_VTELPROTO (OFS_VALARMFN + sizeof(TR_VALARMFN))
#if !defined(PCBI6X)
#define OFS_GPSFORMAT (OFS_VTELPROTO + sizeof(TR_VTELPROTO))
#define OFS_AMPSRC (OFS_GPSFORMAT + sizeof(TR_GPSFORMAT))
#define OFS_VARIOSRC (OFS_AMPSRC + sizeof(TR_AMPSRC))
#else
#define OFS_VARIOSRC (OFS_VTELPROTO + sizeof(TR_VTELPROTO))
#endif
#define OFS_VSCREEN (OFS_VARIOSRC + sizeof(TR_VARIOSRC))
#define OFS_VSCREEN (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
#define OFS_VTEMPLATES (OFS_VSCREEN + sizeof(TR_VTELEMSCREENTYPE))
#define OFS_VSWASHTYPE (OFS_VTEMPLATES)
#if defined(HELI)
#define OFS_VKEYS (OFS_VSWASHTYPE + sizeof(TR_VSWASHTYPE))
#else
#define OFS_VKEYS (OFS_VSWASHTYPE)
#endif
#if defined(MENU_DIAG_ANAS_KEYS)
#define OFS_VSWITCHES (OFS_VKEYS + sizeof(TR_VKEYS))
#else
#define OFS_VSWITCHES (OFS_VKEYS)
#endif
#define OFS_VSRCRAW (OFS_VSWITCHES + sizeof(TR_VSWITCHES))
#if defined(TRANSLATIONS_CZ)
#define OFS_INPUTNAMES (OFS_VSRCRAW + sizeof(TR_VSRCRAW))
Expand All @@ -183,7 +185,11 @@ extern const char STR_OPEN9X[];
#define OFS_VTMRMODES (OFS_VSRCRAW + sizeof(TR_VSRCRAW))
#endif
#define OFS_DATETIME (OFS_VTMRMODES + sizeof(TR_VTMRMODES))
#if defined(RTCCLOCK)
#define OFS_VPERSISTENT (OFS_DATETIME + sizeof(TR_DATETIME))
#else
#define OFS_VPERSISTENT (OFS_DATETIME)
#endif
#if !defined(PCBI6X)
#define OFS_VLCD (OFS_VPERSISTENT + sizeof(TR_VPERSISTENT))
#define OFS_VUNITSSYSTEM (OFS_VLCD + sizeof(TR_VLCD))
Expand Down Expand Up @@ -214,15 +220,12 @@ extern const char STR_OPEN9X[];
#define OFS_DSM_PROTOCOLS (OFS_XJT_PROTOCOLS + sizeof(TR_XJT_PROTOCOLS))
#define OFS_I6X_PROTOCOLS (OFS_DSM_PROTOCOLS + sizeof(TR_DSM_PROTOCOLS))
#else
#define OFS_I6X_PROTOCOLS (OFS_TELEMETRY_PROTOCOLS /* + sizeof(TR_TELEMETRY_PROTOCOLS) */)
#define OFS_I6X_PROTOCOLS (OFS_TELEMETRY_PROTOCOLS)
#endif
#if defined(MULTIMODULE)
#define OFS_MULTI_PROTOCOLS (OFS_I6X_PROTOCOLS + sizeof(TR_I6X_PROTOCOLS))
#define OFS_VOLTSRC (OFS_MULTI_PROTOCOLS + sizeof(TR_MULTI_PROTOCOLS))
#else
#define OFS_VOLTSRC (OFS_I6X_PROTOCOLS + sizeof(TR_I6X_PROTOCOLS))
#endif
#define OFS_CURVE_TYPES (OFS_VOLTSRC + sizeof(TR_VOLTSRC))
#define OFS_CURVE_TYPES (OFS_I6X_PROTOCOLS + sizeof(TR_I6X_PROTOCOLS))
#define OFS_CRSF_ARMING_MODES (OFS_CURVE_TYPES + sizeof(TR_CURVE_TYPES))
#define OFS_VSENSORTYPES (OFS_CRSF_ARMING_MODES + sizeof(TR_CRSF_ARMING_MODES))
#define OFS_VFORMULAS (OFS_VSENSORTYPES + sizeof(TR_VSENSORTYPES))
Expand Down

0 comments on commit bec9456

Please sign in to comment.