[all] I remove the window which masks the screen when a GVAR is modified.
This commit is contained in:
@@ -600,11 +600,6 @@ void menuMainView(uint8_t event)
|
||||
else if (s_global_warning) {
|
||||
s_global_warning = NULL;
|
||||
}
|
||||
#if defined(GVARS)
|
||||
else if (s_gvar_timer > 0) {
|
||||
s_gvar_timer = 0;
|
||||
}
|
||||
#endif
|
||||
#if !defined(PCBTARANIS)
|
||||
else if (view == VIEW_TIMER2) {
|
||||
resetTimer(1);
|
||||
@@ -827,23 +822,6 @@ void menuMainView(uint8_t event)
|
||||
s_warning = NULL;
|
||||
}
|
||||
|
||||
#if defined(GVARS)
|
||||
else if (s_gvar_timer > 0) {
|
||||
s_gvar_timer--;
|
||||
s_warning = STR_GLOBAL_VAR;
|
||||
displayBox();
|
||||
#if defined(PCBSTD)
|
||||
lcd_putsAtt(16+4*FW, 5*FH, PSTR("[\010]"), BOLD);
|
||||
lcd_outdezAtt(16+4*FW+4*FW+FW/2, 5*FH, GVAR_VALUE(s_gvar_last, s_perout_flight_phase), BOLD);
|
||||
#else
|
||||
lcd_putsnAtt(16, 5*FH, g_model.gvarsNames[s_gvar_last], sizeof(gvar_name_t), ZCHAR);
|
||||
lcd_putsAtt(16+7*FW, 5*FH, PSTR("[\010]"), BOLD);
|
||||
lcd_outdezAtt(16+7*FW+4*FW+FW/2, 5*FH, GVAR_VALUE(s_gvar_last, s_perout_flight_phase), BOLD);
|
||||
#endif
|
||||
s_warning = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DSM2)
|
||||
if (dsm2Flag == DSM2_BIND_FLAG) // Issue 98
|
||||
lcd_putsAtt(15*FW, 0, PSTR("BIND"), 0);
|
||||
|
||||
@@ -1301,9 +1301,6 @@ void incRotaryEncoder(uint8_t idx, int8_t inc)
|
||||
#endif
|
||||
|
||||
#if defined(GVARS)
|
||||
uint8_t s_gvar_timer = 0;
|
||||
uint8_t s_gvar_last = 0;
|
||||
|
||||
#if defined(PCBSTD)
|
||||
int16_t getGVarValue(int16_t x, int16_t min, int16_t max)
|
||||
{
|
||||
@@ -1327,8 +1324,6 @@ void setGVarValue(uint8_t idx, int8_t value)
|
||||
if (GVAR_VALUE(idx, -1) != value) {
|
||||
GVAR_VALUE(idx, -1) = value;
|
||||
eeDirty(EE_MODEL);
|
||||
s_gvar_last = idx;
|
||||
s_gvar_timer = GVAR_DISPLAY_TIME;
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -1368,8 +1363,6 @@ void setGVarValue(uint8_t idx, int16_t value, int8_t phase)
|
||||
if (GVAR_VALUE(idx, phase) != value) {
|
||||
GVAR_VALUE(idx, phase) = value;
|
||||
eeDirty(EE_MODEL);
|
||||
s_gvar_last = idx;
|
||||
s_gvar_timer = GVAR_DISPLAY_TIME;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1875,8 +1868,6 @@ uint8_t checkTrim(uint8_t event)
|
||||
if (TRIM_REUSED()) {
|
||||
GVAR_VALUE(trimGvar[idx], phase) = after;
|
||||
eeDirty(EE_MODEL);
|
||||
s_gvar_last = trimGvar[idx];
|
||||
s_gvar_timer = GVAR_DISPLAY_TIME;
|
||||
}
|
||||
else {
|
||||
setTrimValue(phase, idx, after);
|
||||
|
||||
@@ -858,10 +858,6 @@ extern void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim);
|
||||
#define GET_GVAR(x, min, max, p) getGVarValue(x, min, max, p)
|
||||
#define SET_GVAR(idx, val, p) setGVarValue(idx, val, p)
|
||||
#endif
|
||||
|
||||
#define GVAR_DISPLAY_TIME 100 /*1 second*/;
|
||||
extern uint8_t s_gvar_timer;
|
||||
extern uint8_t s_gvar_last;
|
||||
#else
|
||||
#define GET_GVAR(x, ...) (x)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user