feat: Improve defaults, range and wording of SD Log SF (#3058)
* fixes https://github.com/EdgeTX/edgetx/issues/2965 Changes: - the log period range is now 0.1s to 25.5s - upon creation of a new SD Logs SF the period is initialized to 1.0s - text "Value" is changed to "Period" to indicate parameter represents the log period ToDo: - translations for "Period" if desired rebase due to #2992 * changed Period to Interval Added translations for DA, DE, EN, IT, PL * added defaults for TR_INTERVAL to language files * fixed problem with too many leading zeros for intervals less than 1s. before: 00.5s after: 0.5s * added CZ translations for TR_PERIOD and TR_INTERVAL changed EN TR_FUNC from "Func" to "Function" * updated TR_FUNC for CZ, DA, IT, JP, PL updated TR_PERIOD and TR_INTERVAL for JP * added TR_PERIOD, TR_INTERVAL, TR_FUNC for SE * implemented TR_SF_SWITCH and logic to change between TR_SWITCH and TR_SF_SWITCH * 212x64 radios: single source for #define TR_LSW_HEADERS in language files deleted redundant defines * changed 128x64 and 212x64 SF SD Logs to same logic as colorlcd with - minimum log interval 0.1s - maximum log interval 25.5s - default log interval 1.0s TX12_Sim and X9D_Sim tested ok * migrated functional changes due to PR #2992 * missed updating TW language file * fix: Always `STR_SF_SWITCH` regardless of SF Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
#define MODEL_SPECIAL_FUNC_4TH_COLUMN (33*FW-3)
|
||||
#define MODEL_SPECIAL_FUNC_4TH_COLUMN_ONOFF (34*FW-3)
|
||||
|
||||
#define SD_LOGS_PERIOD_MIN 1 // 0.1s fastest period
|
||||
#define SD_LOGS_PERIOD_MAX 255 // 25.5s slowest period
|
||||
#define SD_LOGS_PERIOD_DEFAULT 10 // 1s default period for newly created SF
|
||||
|
||||
void onCustomFunctionsFileSelectionMenu(const char * result)
|
||||
{
|
||||
int sub = menuVerticalPosition;
|
||||
@@ -334,13 +338,15 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
}
|
||||
}
|
||||
else if (func == FUNC_LOGS) {
|
||||
if (val_displayed) {
|
||||
lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed, attr|PREC1|LEFT);
|
||||
lcdDrawChar(lcdLastRightPos, y, 's');
|
||||
}
|
||||
else {
|
||||
lcdDrawMMM(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, attr);
|
||||
val_min = SD_LOGS_PERIOD_MIN;
|
||||
val_max = SD_LOGS_PERIOD_MAX;
|
||||
|
||||
if (!val_displayed) {
|
||||
val_displayed = CFN_PARAM(cfn) = SD_LOGS_PERIOD_DEFAULT;
|
||||
}
|
||||
|
||||
lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed, attr|PREC1|LEFT);
|
||||
lcdDrawChar(lcdLastRightPos, y, 's');
|
||||
}
|
||||
else if (func == FUNC_BACKLIGHT) {
|
||||
val_max = MIXSRC_LAST_CH;
|
||||
|
||||
Reference in New Issue
Block a user