feat(colorlcd): Special Function to set main screen (#2160)

* Special Function to set main screen (#2135)

* chore: Add new SF to LUA constants list

* Companion support

* Formatting

* get rid of magic number

* Add function to get the number of custom screens

* Change screen numbering from 0-based to 1-based.

* Allow SetScreen custom function for Color LCD only

* add range protection

* cleanup

* yet, range protection once again

* fix: paintSpecialFunctionLine can't alter SF param data

* Fix screen initialization in companion

* move screen switching to the UI

* Trigger view change from guiMain()

* chore: Change "SET" to "Set" for consistency

* fix: Somehow missed extra comma in `TW`

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
This commit is contained in:
eshifri
2022-09-07 21:40:34 +10:00
committed by GitHub
co-authored by Peter Feerick elecpower Raphael Coeffic
parent b0c1315f61
commit 4e49ac68be
34 changed files with 215 additions and 74 deletions
@@ -123,6 +123,8 @@ QString CustomFunctionData::funcToString(const AssignFunc func, const ModelData
return tr("Racing Mode");
else if (func == FuncDisableTouch)
return tr("Disable Touch");
else if (func == FuncSetScreen)
return tr("Set Main Screen");
else {
return QString(CPN_STR_UNKNOWN_ITEM);
}
@@ -149,6 +151,9 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
else if (func == FuncVolume || func == FuncPlayValue || func == FuncBacklight) {
return RawSource(param).toString(model);
}
else if (func ==FuncSetScreen) {
return QString("%1").arg(param);
}
else if (func == FuncPlayPrompt || func == FuncPlayBoth) {
if ( getCurrentFirmware()->getCapability(VoicesAsNumbers)) {
return QString("%1").arg(param);
@@ -223,7 +228,8 @@ bool CustomFunctionData::isFuncAvailable(const int index)
((index == FuncScreenshot) && !IS_HORUS_OR_TARANIS(fw->getBoard())) ||
((index >= FuncRangeCheckInternalModule && index <= FuncBindExternalModule) && !fw->getCapability(DangerousFunctions)) ||
((index >= FuncAdjustGV1 && index <= FuncAdjustGVLast) && !fw->getCapability(Gvars)) ||
((index == FuncDisableTouch) && !IS_HORUS_OR_TARANIS(fw->getBoard()))
((index == FuncDisableTouch) && !IS_HORUS_OR_TARANIS(fw->getBoard())) ||
((index == FuncSetScreen && !Boards::getCapability(fw->getBoard(), Board::HasColorLcd)))
);
return !ret;
}
@@ -71,6 +71,7 @@ enum AssignFunc {
FuncBindExternalModule,
FuncRacingMode,
FuncDisableTouch,
FuncSetScreen,
FuncCount,
FuncReserve = -1
};
@@ -36,7 +36,8 @@ static bool fnHasRepeat(AssignFunc fn)
return (fn == FuncPlayPrompt)
|| (fn == FuncPlayValue)
|| (fn == FuncPlayHaptic)
|| (fn == FuncPlaySound);
|| (fn == FuncPlaySound)
|| (fn == FuncSetScreen);
}
static const YamlLookupTable customFnLut = {
@@ -63,6 +64,7 @@ static const YamlLookupTable customFnLut = {
{ FuncScreenshot, "SCREENSHOT" },
{ FuncRacingMode, "RACING_MODE" },
{ FuncDisableTouch, "DISABLE_TOUCH" },
{ FuncSetScreen, "SET_SCREEN"},
};
static const YamlLookupTable trainerLut = {
@@ -206,6 +208,9 @@ Node convert<CustomFunctionData>::encode(const CustomFunctionData& rhs)
case FuncLogs:
def += std::to_string(rhs.param);
break;
case FuncSetScreen:
def += std::to_string(rhs.param);
break;
default:
add_comma = false;
break;
@@ -349,6 +354,11 @@ bool convert<CustomFunctionData>::decode(const Node& node,
def >> param;
rhs.param = param;
} break;
case FuncSetScreen: {
int param = 0;
def >> param;
rhs.param = param;
} break;
default:
break;
}
+12
View File
@@ -1800,3 +1800,15 @@ AbstractStaticItemModel * ModelData::trainerModeItemModel(const GeneralSettings
mdl->loadItemList();
return mdl;
}
int ModelData::getCustomScreensCount() const
{
int cnt = 0;
for (int i = 0; i < MAX_CUSTOM_SCREENS; i++) {
if (customScreens.customScreenData[i].layoutId[0] != '\0')
cnt++;
}
return cnt;
}
+1
View File
@@ -307,6 +307,7 @@ class ModelData {
static QString funcSwitchStartToString(unsigned int value);
static AbstractStaticItemModel * funcSwitchStartItemModel();
int getCustomScreensCount() const;
protected:
void removeGlobalVar(int & var);
@@ -1513,6 +1513,7 @@ class CustomFunctionsConversionTable: public ConversionTable {
addConversion(FuncScreenshot, val++);
addConversion(FuncRacingMode, val++);
addConversion(FuncDisableTouch, val++);
addConversion(FuncSetScreen, val++);
}
}
};
@@ -1581,7 +1582,7 @@ class ArmCustomFunctionField: public TransformedField {
static bool hasRepeatParam(const CustomFunctionData & fn)
{
return (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic);
return (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic || fn.func == FuncSetScreen);
}
void beforeExport() override
+9 -1
View File
@@ -428,7 +428,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
populateFuncParamCB(fswtchParamT[i], func, cfn.param);
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM | CUSTOM_FUNCTION_ENABLE;
}
else if (func == FuncPlaySound || func == FuncPlayHaptic || func == FuncPlayValue || func == FuncPlayPrompt || func == FuncPlayBoth || func == FuncBackgroundMusic) {
else if (func == FuncPlaySound || func == FuncPlayHaptic || func == FuncPlayValue || func == FuncPlayPrompt || func == FuncPlayBoth || func == FuncBackgroundMusic || func == FuncSetScreen) {
if (func != FuncBackgroundMusic) {
if (modified)
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
@@ -507,6 +507,14 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
cfn.param = (uint8_t)fswtchParamT[i]->currentIndex();
populateFuncParamCB(fswtchParamT[i], func, cfn.param);
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM;
} else if (func == FuncSetScreen) {
fswtchParam[i]->setDecimals(0);
fswtchParam[i]->setMinimum(1);
fswtchParam[i]->setMaximum(model->getCustomScreensCount());
fswtchParam[i]->setSingleStep(1);
cfn.param = fswtchParam[i]->value();
fswtchParam[i]->setValue(cfn.param);
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM;
}
}
else if (func == FuncPlayScript) {
+2 -1
View File
@@ -824,9 +824,10 @@ enum Functions {
FUNC_RACING_MODE,
#if defined(COLORLCD)
FUNC_DISABLE_TOUCH,
FUNC_SET_SCREEN,
#endif
#if defined(DEBUG)
FUNC_TEST, // should remain the last before MAX as not added in Companion
FUNC_TEST, // should remain the last before MAX as not added in Companion
#endif
FUNC_MAX SKIP
};
+89 -50
View File
@@ -21,6 +21,10 @@
#include "opentx.h"
#if defined(COLORLCD)
void setRequestedMainView(uint8_t view);
#endif
CustomFunctionsContext modelFunctionsContext = { 0 };
CustomFunctionsContext globalFunctionsContext = { 0 };
@@ -150,7 +154,8 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (swtch) {
MASK_CFN_TYPE switch_mask = ((MASK_CFN_TYPE)1 << i);
bool active = getSwitch(swtch, IS_PLAY_FUNC(CFN_FUNC(cfn)) ? GETSWITCH_MIDPOS_DELAY : 0);
bool active = getSwitch(
swtch, IS_PLAY_FUNC(CFN_FUNC(cfn)) ? GETSWITCH_MIDPOS_DELAY : 0);
if (HAS_ENABLE_PARAM(CFN_FUNC(cfn))) {
active &= (bool)CFN_ACTIVE(cfn);
@@ -158,15 +163,13 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (active) {
switch (CFN_FUNC(cfn)) {
#if defined(OVERRIDE_CHANNEL_FUNCTION)
case FUNC_OVERRIDE_CHANNEL:
safetyCh[CFN_CH_INDEX(cfn)] = CFN_PARAM(cfn);
break;
#endif
case FUNC_TRAINER:
{
case FUNC_TRAINER: {
uint8_t param = CFN_CH_INDEX(cfn);
if (param == 0)
newActiveFunctions |= 0x0F;
@@ -194,16 +197,20 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
timerReset(CFN_PARAM(cfn));
break;
case FUNC_RESET_FLIGHT:
if (!(functionsContext.activeSwitches & switch_mask)) {
mainRequestFlags |= (1 << REQUEST_FLIGHT_RESET); // on systems with threads flightReset() must not be called from the mixers thread!
if (!(functionsContext.activeSwitches & switch_mask)) {
mainRequestFlags |=
(1 << REQUEST_FLIGHT_RESET); // on systems with threads
// flightReset() must not be
// called from the mixers
// thread!
}
break;
case FUNC_RESET_TELEMETRY:
telemetryReset();
break;
}
if (CFN_PARAM(cfn)>=FUNC_RESET_PARAM_FIRST_TELEM) {
uint8_t item = CFN_PARAM(cfn)-FUNC_RESET_PARAM_FIRST_TELEM;
if (CFN_PARAM(cfn) >= FUNC_RESET_PARAM_FIRST_TELEM) {
uint8_t item = CFN_PARAM(cfn) - FUNC_RESET_PARAM_FIRST_TELEM;
if (item < MAX_TELEMETRY_SENSORS) {
telemetryItems[item].clear();
}
@@ -220,46 +227,62 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
#if defined(DANGEROUS_MODULE_FUNCTIONS)
case FUNC_RANGECHECK:
case FUNC_BIND:
{
case FUNC_BIND: {
unsigned int moduleIndex = CFN_PARAM(cfn);
if (moduleIndex < NUM_MODULES) {
moduleState[moduleIndex].mode = 1 + CFN_FUNC(cfn) - FUNC_RANGECHECK;
moduleState[moduleIndex].mode =
1 + CFN_FUNC(cfn) - FUNC_RANGECHECK;
}
break;
}
#endif
#endif
#if defined(GVARS)
case FUNC_ADJUST_GVAR:
if (CFN_GVAR_MODE(cfn) == FUNC_ADJUST_GVAR_CONSTANT) {
SET_GVAR(CFN_GVAR_INDEX(cfn), CFN_PARAM(cfn), mixerCurrentFlightMode);
}
else if (CFN_GVAR_MODE(cfn) == FUNC_ADJUST_GVAR_GVAR) {
SET_GVAR(CFN_GVAR_INDEX(cfn), GVAR_VALUE(CFN_PARAM(cfn), getGVarFlightMode(mixerCurrentFlightMode, CFN_PARAM(cfn))), mixerCurrentFlightMode);
}
else if (CFN_GVAR_MODE(cfn) == FUNC_ADJUST_GVAR_INCDEC) {
SET_GVAR(CFN_GVAR_INDEX(cfn), CFN_PARAM(cfn),
mixerCurrentFlightMode);
} else if (CFN_GVAR_MODE(cfn) == FUNC_ADJUST_GVAR_GVAR) {
SET_GVAR(CFN_GVAR_INDEX(cfn),
GVAR_VALUE(CFN_PARAM(cfn),
getGVarFlightMode(mixerCurrentFlightMode,
CFN_PARAM(cfn))),
mixerCurrentFlightMode);
} else if (CFN_GVAR_MODE(cfn) == FUNC_ADJUST_GVAR_INCDEC) {
if (!(functionsContext.activeSwitches & switch_mask)) {
SET_GVAR(CFN_GVAR_INDEX(cfn), limit<int16_t>(MODEL_GVAR_MIN(CFN_GVAR_INDEX(cfn)), GVAR_VALUE(CFN_GVAR_INDEX(cfn), getGVarFlightMode(mixerCurrentFlightMode, CFN_GVAR_INDEX(cfn))) + CFN_PARAM(cfn), MODEL_GVAR_MAX(CFN_GVAR_INDEX(cfn))), mixerCurrentFlightMode);
SET_GVAR(CFN_GVAR_INDEX(cfn),
limit<int16_t>(MODEL_GVAR_MIN(CFN_GVAR_INDEX(cfn)),
GVAR_VALUE(CFN_GVAR_INDEX(cfn),
getGVarFlightMode(
mixerCurrentFlightMode,
CFN_GVAR_INDEX(cfn))) +
CFN_PARAM(cfn),
MODEL_GVAR_MAX(CFN_GVAR_INDEX(cfn))),
mixerCurrentFlightMode);
}
}
else if (CFN_PARAM(cfn) >= MIXSRC_FIRST_TRIM && CFN_PARAM(cfn) <= MIXSRC_LAST_TRIM) {
trimGvar[CFN_PARAM(cfn)-MIXSRC_FIRST_TRIM] = CFN_GVAR_INDEX(cfn);
}
else {
SET_GVAR(CFN_GVAR_INDEX(cfn), limit<int16_t>(MODEL_GVAR_MIN(CFN_GVAR_INDEX(cfn)), calcRESXto100(getValue(CFN_PARAM(cfn))), MODEL_GVAR_MAX(CFN_GVAR_INDEX(cfn))), mixerCurrentFlightMode);
} else if (CFN_PARAM(cfn) >= MIXSRC_FIRST_TRIM &&
CFN_PARAM(cfn) <= MIXSRC_LAST_TRIM) {
trimGvar[CFN_PARAM(cfn) - MIXSRC_FIRST_TRIM] =
CFN_GVAR_INDEX(cfn);
} else {
SET_GVAR(CFN_GVAR_INDEX(cfn),
limit<int16_t>(MODEL_GVAR_MIN(CFN_GVAR_INDEX(cfn)),
calcRESXto100(getValue(CFN_PARAM(cfn))),
MODEL_GVAR_MAX(CFN_GVAR_INDEX(cfn))),
mixerCurrentFlightMode);
}
break;
#endif
case FUNC_VOLUME:
{
case FUNC_VOLUME: {
getvalue_t raw = getValue(CFN_PARAM(cfn));
// only set volume if input changed more than hysteresis
if (abs(requiredSpeakerVolumeRawLast - raw) > VOLUME_HYSTERESIS) {
requiredSpeakerVolumeRawLast = raw;
}
requiredSpeakerVolume = ((1024 + requiredSpeakerVolumeRawLast) * VOLUME_LEVEL_MAX) / 2048;
requiredSpeakerVolume =
((1024 + requiredSpeakerVolumeRawLast) * VOLUME_LEVEL_MAX) /
2048;
break;
}
@@ -277,13 +300,12 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (audioQueue.isEmpty()) {
AUDIO_PLAY(AU_SPECIAL_SOUND_FIRST + CFN_PARAM(cfn));
}
}
else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
} else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
PLAY_VALUE(CFN_PARAM(cfn), PLAY_INDEX);
}
#if defined(HAPTIC)
else if (CFN_FUNC(cfn) == FUNC_HAPTIC) {
haptic.event(AU_SPECIAL_SOUND_LAST+CFN_PARAM(cfn));
haptic.event(AU_SPECIAL_SOUND_LAST + CFN_PARAM(cfn));
}
#endif
else {
@@ -311,25 +333,30 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
case FUNC_PLAY_SOUND:
case FUNC_PLAY_TRACK:
case FUNC_PLAY_BOTH:
case FUNC_PLAY_VALUE:
{
case FUNC_PLAY_VALUE: {
tmr10ms_t tmr10ms = get_tmr10ms();
uint8_t repeatParam = CFN_PLAY_REPEAT(cfn);
if (!functionsContext.lastFunctionTime[i] || (CFN_FUNC(cfn)==FUNC_PLAY_BOTH && active!=(bool)(functionsContext.activeSwitches&switch_mask)) || (repeatParam && (signed)(tmr10ms-functionsContext.lastFunctionTime[i])>=1000*repeatParam)) {
if (!functionsContext.lastFunctionTime[i] ||
(CFN_FUNC(cfn) == FUNC_PLAY_BOTH &&
active !=
(bool)(functionsContext.activeSwitches & switch_mask)) ||
(repeatParam &&
(signed)(tmr10ms - functionsContext.lastFunctionTime[i]) >=
1000 * repeatParam)) {
functionsContext.lastFunctionTime[i] = tmr10ms;
uint8_t param = CFN_PARAM(cfn);
if (CFN_FUNC(cfn) == FUNC_PLAY_SOUND) {
AUDIO_PLAY(AU_SPECIAL_SOUND_FIRST+param);
}
else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
AUDIO_PLAY(AU_SPECIAL_SOUND_FIRST + param);
} else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
PLAY_VALUE(param, PLAY_INDEX);
}
else {
} else {
#if defined(GVARS)
if (CFN_FUNC(cfn) == FUNC_PLAY_TRACK && param > 250)
param = GVAR_VALUE(param-251, getGVarFlightMode(mixerCurrentFlightMode, param-251));
param = GVAR_VALUE(
param - 251,
getGVarFlightMode(mixerCurrentFlightMode, param - 251));
#endif
PUSH_CUSTOM_PROMPT(active ? param : param+1, PLAY_INDEX);
PUSH_CUSTOM_PROMPT(active ? param : param + 1, PLAY_INDEX);
}
}
if (!active) {
@@ -346,20 +373,21 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
break;
#endif
#if defined(SDCARD)
case FUNC_LOGS:
if (CFN_PARAM(cfn)) {
newActiveFunctions |= (1u << FUNCTION_LOGS);
logDelay100ms = CFN_PARAM(cfn); // logging period is 0..25.5s in 100ms increments
logDelay100ms = CFN_PARAM(
cfn); // logging period is 0..25.5s in 100ms increments
}
break;
#endif
case FUNC_BACKLIGHT:
{
case FUNC_BACKLIGHT: {
newActiveFunctions |= (1u << FUNCTION_BACKLIGHT);
if (!CFN_PARAM(cfn)) { // When no source is set, backlight works like original backlight and turn on regardless of backlight settings
if (!CFN_PARAM(cfn)) { // When no source is set, backlight works
// like original backlight and turn on
// regardless of backlight settings
requiredBacklightBright = BACKLIGHT_FORCED_ON;
break;
}
@@ -369,7 +397,9 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (raw == -1024)
requiredBacklightBright = 100;
else
requiredBacklightBright = (1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) / 2048;
requiredBacklightBright =
(1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) /
2048;
#else
requiredBacklightBright = (1024 - raw) * 100 / 2048;
#endif
@@ -392,7 +422,17 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
#if defined(HARDWARE_TOUCH)
case FUNC_DISABLE_TOUCH:
newActiveFunctions |= (1u << FUNCTION_DISABLE_TOUCH);
break;
break;
#endif
#if defined(COLORLCD)
case FUNC_SET_SCREEN:
if (isRepeatDelayElapsed(functions, functionsContext, i)) {
TRACE("SET VIEW %d", (CFN_PARAM(cfn)));
int8_t screenNumber = max(0, CFN_PARAM(cfn) - 1);
setRequestedMainView(screenNumber);
mainRequestFlags |= (1u << REQUEST_MAIN_VIEW);
}
break;
#endif
#if defined(DEBUG)
case FUNC_TEST:
@@ -402,8 +442,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
}
newActiveSwitches |= switch_mask;
}
else {
} else {
functionsContext.lastFunctionTime[i] = 0;
#if defined(DANGEROUS_MODULE_FUNCTIONS)
if (functionsContext.activeSwitches & switch_mask) {
+1
View File
@@ -58,6 +58,7 @@ extern uint8_t requiredBacklightBright;
enum MainRequest {
REQUEST_SCREENSHOT,
REQUEST_FLIGHT_RESET,
REQUEST_MAIN_VIEW,
};
extern uint8_t mainRequestFlags;
+17 -1
View File
@@ -22,6 +22,7 @@
#include "special_functions.h"
#include "opentx.h"
#include "libopenui.h"
#include "view_main.h"
#define SET_DIRTY() storageDirty(functions == g_model.customFn ? EE_MODEL : EE_GENERAL)
@@ -241,8 +242,19 @@ class SpecialFunctionEditPage : public Page
break;
}
case FUNC_SET_SCREEN:
new StaticText(specialFunctionOneWindow, grid.getLabelSlot(), STR_VALUE,
0, COLOR_THEME_PRIMARY1);
CFN_PARAM(cfn) = (int16_t)max(CFN_PARAM(cfn), (int16_t)1);
CFN_PARAM(cfn) = (int16_t)min(
CFN_PARAM(cfn), (int16_t)ViewMain::instance()->getMainViewsCount());
new NumberEdit(specialFunctionOneWindow, grid.getFieldSlot(), 1,
ViewMain::instance()->getMainViewsCount(),
GET_SET_DEFAULT(CFN_PARAM(cfn)));
grid.nextLine();
break;
case FUNC_ADJUST_GVAR: {
new StaticText(specialFunctionOneWindow, grid.getLabelSlot(), STR_GLOBALVAR, 0, COLOR_THEME_PRIMARY1);
auto gvarchoice =
new Choice(specialFunctionOneWindow, grid.getFieldSlot(), 0,
@@ -549,6 +561,10 @@ class SpecialFunctionButton : public Button
dc->drawNumber(col3, line1, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1 | PREC1, sizeof(CFN_PARAM(cfn)), nullptr, "s");
break;
case FUNC_SET_SCREEN:
dc->drawNumber(col2, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_ADJUST_GVAR:
switch(CFN_GVAR_MODE(cfn)) {
case FUNC_ADJUST_GVAR_CONSTANT:
+6 -1
View File
@@ -107,7 +107,7 @@ void ViewMain::addMainView(Window* view, uint32_t viewId)
auto view_obj = view->getLvObj();
lv_obj_set_parent(view_obj, tile);
auto user_data = (void*)(unsigned long)viewId;
auto user_data = (void*)(intptr_t)viewId;
lv_obj_add_event_cb(tile, tile_view_deleted_cb, LV_EVENT_CHILD_DELETED, user_data);
}
@@ -140,6 +140,11 @@ void ViewMain::setCurrentMainView(unsigned viewId)
lv_obj_set_tile_id(tile_view, viewId, 0, LV_ANIM_OFF);
}
void setRequestedMainView(uint8_t view)
{
g_model.view = view;
}
void ViewMain::nextMainView()
{
auto view = getCurrentMainView();
+1 -2
View File
@@ -75,11 +75,10 @@ class ViewMain: public Window
void onEvent(event_t event) override;
void onClicked() override;
void onCancel() override;
protected:
static ViewMain * _instance;
unsigned views = 0;
lv_obj_t* tile_view = nullptr;
TopbarImpl* topbar = nullptr;
bool widget_select = false;
+1
View File
@@ -2625,6 +2625,7 @@ const luaR_value_entry opentxConstants[] = {
{ "FUNC_RACING_MODE", FUNC_RACING_MODE },
#if defined(COLORLCD)
{ "FUNC_DISABLE_TOUCH", FUNC_DISABLE_TOUCH },
{ "FUNC_SET_SCREEN", FUNC_SET_SCREEN },
{ "SHADOWED", SHADOWED },
{ "COLOR", ZoneOption::Color },
+13
View File
@@ -25,6 +25,7 @@
#if defined(LIBOPENUI)
#include "libopenui.h"
#include "gui/colorlcd/LvglWrapper.h"
#include "gui/colorlcd/view_main.h"
#endif
#if defined(CLI)
@@ -376,6 +377,18 @@ void guiMain(event_t evt)
LvglWrapper::instance()->run();
MainWindow::instance()->run();
bool mainViewRequested = (mainRequestFlags & (1u << REQUEST_MAIN_VIEW));
if (mainViewRequested) {
auto viewMain = ViewMain::instance();
if (g_model.view < viewMain->getMainViewsCount()) {
viewMain->setCurrentMainView(g_model.view);
storageDirty(EE_MODEL);
} else {
g_model.view = viewMain->getCurrentMainView();
}
mainRequestFlags &= ~(1u << REQUEST_MAIN_VIEW);
}
bool screenshotRequested = (mainRequestFlags & (1u << REQUEST_SCREENSHOT));
if (screenshotRequested) {
writeScreenshot();
+5 -1
View File
@@ -60,7 +60,11 @@
#endif
#define HAS_ENABLE_PARAM(func) ((func) < FUNC_FIRST_WITHOUT_ENABLE || (func == FUNC_BACKLIGHT))
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func))
#if defined(COLORLCD)
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func) || func == FUNC_SET_SCREEN)
#else
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func) )
#endif
#define CFN_EMPTY(p) (!(p)->swtch)
#define CFN_SWITCH(p) ((p)->swtch)
@@ -1298,6 +1298,9 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs,
}
break;
#if defined(COLORLCD)
case FUNC_SET_SCREEN:
#endif
case FUNC_HAPTIC:
case FUNC_LOGS: // 10th of seconds
CFN_PARAM(cfn) = yaml_str2uint(val, l_sep);
@@ -1472,6 +1475,9 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
if (!wf(opaque, str, strlen(str))) return false;
break;
#if defined(COLORLCD)
case FUNC_SET_SCREEN:
#endif
case FUNC_HAPTIC:
case FUNC_LOGS: // 10th of seconds
str = yaml_unsigned2str(CFN_PARAM(cfn));
@@ -84,6 +84,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ 0, NULL }
};
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
@@ -84,6 +84,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ 0, NULL }
};
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
@@ -84,6 +84,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ 0, NULL }
};
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
+2 -1
View File
@@ -160,9 +160,10 @@
#define TR_SF_SCREENSHOT "截屏"
#define TR_SF_RACING_MODE "竞速模式"
#define TR_SF_DISABLE_TOUCH "禁用触摸"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[保留]"
#define TR_VFSWFUNC TR_SF_SAFETY,"教练","摇杆值存储到微调","复位","设置",TR_ADJUST_GVAR,"音量","设置失控保护","测距模式","模块对频",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"背光",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"教练","摇杆值存储到微调","复位","设置",TR_ADJUST_GVAR,"音量","设置失控保护","测距模式","模块对频",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"背光",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM "回传参数"
+2 -1
View File
@@ -163,9 +163,10 @@
#define TR_SF_SCREENSHOT "Snímek LCD"
#define TR_SF_RACING_MODE "Závodní režim"
#define TR_SF_DISABLE_TOUCH "Deaktivace dotyku"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[rezerva]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Trenér","Insta-Trim","Reset","Změna",TR_ADJUST_GVAR,"Hlasitost","Nastavit Failsafe","Kontrola dosahu","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Podsvětlení",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Trenér","Insta-Trim","Reset","Změna",TR_ADJUST_GVAR,"Hlasitost","Nastavit Failsafe","Kontrola dosahu","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Podsvětlení",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm","Telemetrie")
+2 -1
View File
@@ -160,9 +160,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Træner","Inst. Trim","Nulstil","Sæt",TR_ADJUST_GVAR,"Volume","SetFejlsikr","AfstandCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Baggrundslys",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Træner","Inst. Trim","Nulstil","Sæt",TR_ADJUST_GVAR,"Volume","SetFejlsikr","AfstandCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Baggrundslys",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetri")
+2 -1
View File
@@ -164,9 +164,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "Kein Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[Reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Lehrer","Inst. Trim","Rücksetz.","Setze",TR_ADJUST_GVAR,"Lautstr.","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"LCD Licht",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Lehrer","Inst. Trim","Rücksetz.","Setze",TR_ADJUST_GVAR,"Lautstr.","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"LCD Licht",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm","Telemetrie")
+2 -1
View File
@@ -160,9 +160,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH, TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
+2 -1
View File
@@ -161,9 +161,10 @@
#define TR_SF_SCREENSHOT "Captura"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserv.]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Entrenador","Inst. Trim","Reset","Ajuste",TR_ADJUST_GVAR,"Volumen","Failsafe","CheckRango","Enl.módulo",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Luz Fondo",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Entrenador","Inst. Trim","Reset","Ajuste",TR_ADJUST_GVAR,"Volumen","Failsafe","CheckRango","Enl.módulo",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Luz Fondo",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetría")
+2 -1
View File
@@ -165,9 +165,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm","Telemetry")
+2 -1
View File
@@ -166,9 +166,10 @@
#define TR_SF_SCREENSHOT "Photo Ecran"
#define TR_SF_RACING_MODE "Racing Mode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Ecolage","Trim instant.","Remise à 0","Déf.",TR_ADJUST_GVAR,"Volume","DéfFailsafe","Test Port.","Bind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Rétroécl.",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Ecolage","Trim instant.","Remise à 0","Déf.",TR_ADJUST_GVAR,"Volume","DéfFailsafe","Test Port.","Bind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Rétroécl.",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Télm", "Télémétrie")
+2 -1
View File
@@ -164,9 +164,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "Modo Racing"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[riserva]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Maestro","Trim Instant.","Azzera","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Retroillum.",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Maestro","Trim Instant.","Azzera","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Retroillum.",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetr.")
+2 -1
View File
@@ -163,9 +163,10 @@
#define TR_SF_SCREENSHOT "Schermafdr"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Trainer","Inst. Trim","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
+2 -1
View File
@@ -161,9 +161,10 @@
#define TR_SF_SCREENSHOT "Zrzut Ekra"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[rezerwa]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Trener","Inst-Trim","Resetuj","Ustaw",TR_ADJUST_GVAR,"Głośność","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Podświetl",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Trener","Inst-Trim","Resetuj","Ustaw",TR_ADJUST_GVAR,"Głośność","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Podświetl",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetra")
+2 -1
View File
@@ -159,9 +159,10 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RACING_MODE "RacingMode"
#define TR_SF_DISABLE_TOUCH "No Touch"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserve]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Aprendiz","Ajuste Rapido","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Aprendiz","Ajuste Rapido","Reset","Set",TR_ADJUST_GVAR,"Volume","SetFailsafe","RangeCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Backlight",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
+2 -1
View File
@@ -165,9 +165,10 @@
#define TR_SF_SCREENSHOT "Skärmbild"
#define TR_SF_RACING_MODE "Tävlingsläge"
#define TR_SF_DISABLE_TOUCH "Ej pekskärm"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[reserv]"
#define TR_VFSWFUNC TR_SF_SAFETY,"Lärare","Sätt trimm","Nollställ","Sätt",TR_ADJUST_GVAR,"Volym","Sätt failsafe","Range check","Module bind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE, TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Belysning", TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"Lärare","Sätt trimm","Nollställ","Sätt",TR_ADJUST_GVAR,"Volym","Sätt failsafe","Range check","Module bind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE, TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Belysning", TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM TR("Telm","Telemetri")
+2 -1
View File
@@ -160,9 +160,10 @@
#define TR_SF_SCREENSHOT "截屏"
#define TR_SF_RACING_MODE "競速模式"
#define TR_SF_DISABLE_TOUCH "禁用觸摸"
#define TR_SF_SET_SCREEN "Set Main Screen"
#define TR_SF_RESERVE "[保留]"
#define TR_VFSWFUNC TR_SF_SAFETY,"教練","搖桿值存儲到微調","重啟","設置",TR_ADJUST_GVAR,"音量","設置失控保護","測距模式","模塊對頻",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"背光",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY,"教練","搖桿值存儲到微調","重啟","設置",TR_ADJUST_GVAR,"音量","設置失控保護","測距模式","模塊對頻",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"背光",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH, TR_SF_SET_SCREEN TR_SF_TEST
#define TR_FSW_RESET_TELEM "回傳參數"