[all] Inverted flash on beep when backlight is ON
[Taranis] Menu in MODELSEL [all] Menus wrap around + keys repeat [Gruvin9x] Issue 16 fixed
This commit is contained in:
+1
-6
@@ -711,13 +711,8 @@ void audioEvent(uint8_t e, uint8_t f)
|
||||
#endif
|
||||
|
||||
if (e <= AU_ERROR || e >= AU_WARNING1) {
|
||||
#if defined(BUZZER)
|
||||
beep();
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.alarmsFlash) {
|
||||
if (lightOffCounter < FLASH_DURATION)
|
||||
lightOffCounter = FLASH_DURATION;
|
||||
flashCounter = FLASH_DURATION;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -169,8 +169,7 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
|
||||
if (e <= AU_ERROR || e >= AU_WARNING1) {
|
||||
if (g_eeGeneral.alarmsFlash) {
|
||||
if (lightOffCounter < FLASH_DURATION)
|
||||
lightOffCounter = FLASH_DURATION;
|
||||
flashCounter = FLASH_DURATION;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-40
@@ -111,55 +111,42 @@ extern audioQueue audio;
|
||||
|
||||
void audioDefevent(uint8_t e);
|
||||
|
||||
#if defined(BUZZER)
|
||||
#define AUDIO_BUZZER(evt, bz) do { audioDefevent(evt); beep(bz); } while(0)
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
#define AUDIO_BUZZER(a, b) do { a; b; } while(0)
|
||||
#elif defined(AUDIO)
|
||||
#define AUDIO_BUZZER(a, b) a
|
||||
#else
|
||||
#define AUDIO_BUZZER(evt, bz) audioDefevent(evt)
|
||||
#define AUDIO_BUZZER(a, b) b
|
||||
#endif
|
||||
|
||||
#define AUDIO_KEYPAD_UP() AUDIO_BUZZER(AU_KEYPAD_UP, 0)
|
||||
#define AUDIO_KEYPAD_DOWN() AUDIO_BUZZER(AU_KEYPAD_DOWN, 0)
|
||||
#define AUDIO_MENUS() AUDIO_BUZZER(AU_MENUS, 0)
|
||||
#define AUDIO_WARNING1() AUDIO_BUZZER(AU_WARNING1, 3)
|
||||
#define AUDIO_WARNING2() AUDIO_BUZZER(AU_WARNING2, 2)
|
||||
#define AUDIO_ERROR() AUDIO_BUZZER(AU_ERROR, 4)
|
||||
|
||||
#if defined(VOICE)
|
||||
#define AUDIO_TADA() PUSH_SYSTEM_PROMPT(AU_TADA)
|
||||
#define AUDIO_TX_BATTERY_LOW() PUSH_SYSTEM_PROMPT(AU_TX_BATTERY_LOW)
|
||||
#define AUDIO_INACTIVITY() PUSH_SYSTEM_PROMPT(AU_INACTIVITY)
|
||||
#define AUDIO_ERROR_MESSAGE(e) PUSH_SYSTEM_PROMPT((e))
|
||||
#define AUDIO_TIMER_MINUTE(t) playDuration(t)
|
||||
#define AUDIO_TIMER_30() PUSH_SYSTEM_PROMPT(AU_TIMER_30)
|
||||
#define AUDIO_TIMER_20() PUSH_SYSTEM_PROMPT(AU_TIMER_20)
|
||||
#define AUDIO_TIMER_10() PUSH_SYSTEM_PROMPT(AU_TIMER_10)
|
||||
#define AUDIO_TIMER_LT3(x) PUSH_SYSTEM_PROMPT(AU_TIMER_LT3)
|
||||
#define VOICE_AUDIO_BUZZER(v, a, b) v
|
||||
#else
|
||||
#define AUDIO_TADA()
|
||||
#define AUDIO_TX_BATTERY_LOW() AUDIO_BUZZER(AU_TX_BATTERY_LOW, 4)
|
||||
#define AUDIO_INACTIVITY() AUDIO_BUZZER(AU_INACTIVITY, 3)
|
||||
#define AUDIO_ERROR_MESSAGE(e) AUDIO_BUZZER(AU_ERROR, 4)
|
||||
#define AUDIO_TIMER_MINUTE(t) AUDIO_BUZZER(AU_WARNING1, 2)
|
||||
#define AUDIO_TIMER_30() audioDefevent(AU_TIMER_30)
|
||||
#define AUDIO_TIMER_20() audioDefevent(AU_TIMER_20)
|
||||
#define AUDIO_TIMER_10() AUDIO_BUZZER(AU_TIMER_10, 2)
|
||||
#define AUDIO_TIMER_LT3(x) AUDIO_BUZZER(AU_TIMER_LT3, 2)
|
||||
#define VOICE_AUDIO_BUZZER(v, a, b) AUDIO_BUZZER(a, b)
|
||||
#endif
|
||||
|
||||
/* TODO BUZZER mode for these events
|
||||
#define AUDIO_TRIM(event, f) { if (!IS_KEY_FIRST(event)) warble = true; beep(1); }
|
||||
#define AUDIO_TRIM_MIDDLE(f) beep(2)
|
||||
#define AUDIO_TIMER_30() { beepAgain=2; beep(2); }
|
||||
#define AUDIO_TIMER_20() { beepAgain=1; beep(2); }
|
||||
*/
|
||||
|
||||
#define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(AU_MIX_WARNING_1+x-1, 1)
|
||||
#define AUDIO_POT_STICK_MIDDLE() AUDIO_BUZZER(AU_POT_STICK_MIDDLE, 2)
|
||||
#define AUDIO_KEYPAD_UP() AUDIO_BUZZER(audioDefevent(AU_KEYPAD_UP), beep(0))
|
||||
#define AUDIO_KEYPAD_DOWN() AUDIO_BUZZER(audioDefevent(AU_KEYPAD_DOWN), beep(0))
|
||||
#define AUDIO_MENUS() AUDIO_BUZZER(audioDefevent(AU_MENUS), beep(0))
|
||||
#define AUDIO_WARNING1() AUDIO_BUZZER(audioDefevent(AU_WARNING1), beep(3))
|
||||
#define AUDIO_WARNING2() AUDIO_BUZZER(audioDefevent(AU_WARNING2), beep(2))
|
||||
#define AUDIO_ERROR() AUDIO_BUZZER(audioDefevent(AU_ERROR), beep(4))
|
||||
#define AUDIO_TADA() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TADA),,)
|
||||
#define AUDIO_TX_BATTERY_LOW() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TX_BATTERY_LOW), audioDefevent(AU_TX_BATTERY_LOW), beep(4))
|
||||
#define AUDIO_INACTIVITY() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_INACTIVITY), audioDefevent(AU_INACTIVITY), beep(3))
|
||||
#define AUDIO_ERROR_MESSAGE(e) VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT((e)), audioDefevent(AU_ERROR), beep(4))
|
||||
#define AUDIO_TIMER_MINUTE(t) VOICE_AUDIO_BUZZER(playDuration(t), audioDefevent(AU_WARNING1), beep(2))
|
||||
#define AUDIO_TIMER_30() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TIMER_30), audioDefevent(AU_TIMER_30), { beepAgain=2; beep(2); })
|
||||
#define AUDIO_TIMER_20() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TIMER_20), audioDefevent(AU_TIMER_20), { beepAgain=1; beep(2); })
|
||||
#define AUDIO_TIMER_10() VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TIMER_10), audioDefevent(AU_TIMER_10), beep(2))
|
||||
#define AUDIO_TIMER_LT3(x) VOICE_AUDIO_BUZZER(PUSH_SYSTEM_PROMPT(AU_TIMER_LT3), audioDefevent(AU_TIMER_LT3), beep(2))
|
||||
#define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(audioDefevent(AU_MIX_WARNING_1+x-1), beep(1))
|
||||
#define AUDIO_POT_STICK_MIDDLE() AUDIO_BUZZER(audioDefevent(AU_POT_STICK_MIDDLE), beep(2))
|
||||
#define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_TRIM_MIDDLE(f) audio.event(AU_TRIM_MIDDLE, f)
|
||||
#define AUDIO_TRIM_END(f) AUDIO_BUZZER(f, 2)
|
||||
#define AUDIO_TRIM(event, f) audio.event(AU_TRIM_MOVE, f)
|
||||
#define AUDIO_TRIM_MIDDLE(f) AUDIO_BUZZER(audio.event(AU_TRIM_MIDDLE, f), beep(2))
|
||||
#define AUDIO_TRIM_END(f) AUDIO_BUZZER(audioDefevent(f), beep(2))
|
||||
#define AUDIO_TRIM(event, f) AUDIO_BUZZER(audio.event(AU_TRIM_MOVE, f), { if (!IS_KEY_FIRST(event)) warble = true; beep(1); })
|
||||
#define AUDIO_PLAY(p) audio.event(p)
|
||||
#define AUDIO_VARIO(f, t) audio.play(f, t, 0, PLAY_BACKGROUND)
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ void beep(uint8_t val)
|
||||
#endif
|
||||
|
||||
#if !defined(AUDIO)
|
||||
if (g_eeGeneral.alarmsFlash && val>1 && lightOffCounter<FLASH_DURATION) lightOffCounter = FLASH_DURATION;
|
||||
if (g_eeGeneral.alarmsFlash && val>1) flashCounter = FLASH_DURATION;
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.beepMode>0 || (g_eeGeneral.beepMode==0 && val!=0) || (g_eeGeneral.beepMode==-1 && val>=3)) {
|
||||
|
||||
+28
-16
@@ -252,7 +252,6 @@ void onModelSelectMenu(const char *result)
|
||||
eeLoadModel(sub);
|
||||
}
|
||||
}
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
else if (result == STR_COPY_MODEL) {
|
||||
s_copyMode = COPY_MODE;
|
||||
s_copyTgtOfs = 0;
|
||||
@@ -263,7 +262,6 @@ void onModelSelectMenu(const char *result)
|
||||
s_copyTgtOfs = 0;
|
||||
s_copySrcRow = -1;
|
||||
}
|
||||
#endif
|
||||
#if defined(SDCARD)
|
||||
else if (result == STR_BACKUP_MODEL) {
|
||||
eeCheck(true); // force writing of current model data before this is changed
|
||||
@@ -447,8 +445,8 @@ void menuModelSelect(uint8_t event)
|
||||
if (eeModelExists(sub)) {
|
||||
MENU_ADD_ITEM(STR_SELECT_MODEL);
|
||||
MENU_ADD_SD_ITEM(STR_BACKUP_MODEL);
|
||||
MENU_ADD_NAVIGATION_ITEM(STR_COPY_MODEL);
|
||||
MENU_ADD_NAVIGATION_ITEM(STR_MOVE_MODEL);
|
||||
MENU_ADD_ITEM(STR_COPY_MODEL);
|
||||
MENU_ADD_ITEM(STR_MOVE_MODEL);
|
||||
MENU_ADD_ITEM(STR_DELETE_MODEL);
|
||||
}
|
||||
else {
|
||||
@@ -470,8 +468,8 @@ void menuModelSelect(uint8_t event)
|
||||
}
|
||||
else {
|
||||
MENU_ADD_SD_ITEM(STR_BACKUP_MODEL);
|
||||
MENU_ADD_NAVIGATION_ITEM(STR_COPY_MODEL);
|
||||
MENU_ADD_NAVIGATION_ITEM(STR_MOVE_MODEL);
|
||||
MENU_ADD_ITEM(STR_COPY_MODEL);
|
||||
MENU_ADD_ITEM(STR_MOVE_MODEL);
|
||||
}
|
||||
menuHandler = onModelSelectMenu;
|
||||
#else
|
||||
@@ -894,10 +892,10 @@ void menuModelSetup(uint8_t event)
|
||||
|
||||
case ITEM_MODEL_EXTENDED_TRIMS:
|
||||
#if defined(CPUM64)
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, event);
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, attr, event);
|
||||
#else
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, m_posHorz<=0 ? attr : 0, event==EVT_KEY_BREAK(KEY_ENTER) ? event : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, PSTR("[Reset]"), m_posHorz>0 ? attr : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET, m_posHorz>0 ? attr : 0);
|
||||
if (attr && m_posHorz>0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = 0;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
@@ -3130,7 +3128,7 @@ void menuModelCurvesAll(uint8_t event)
|
||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES)
|
||||
void menuModelGVars(uint8_t event)
|
||||
{
|
||||
MENU(PSTR("GLOBAL VARIABLES"), menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
||||
MENU(STR_MENUGLOBALVARS, menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
@@ -3311,7 +3309,7 @@ void menuModelCustomSwitchOne(uint8_t event)
|
||||
break;
|
||||
}
|
||||
case CSW_FIELD_ANDSW:
|
||||
lcd_putsLeft(y, PSTR("AND Switch"));
|
||||
lcd_putsLeft(y, STR_AND_SWITCH);
|
||||
putsSwitches(CSWONE_2ND_COLUMN, y, cs->andsw, attr);
|
||||
if (attr) CHECK_INCDEC_MODELVAR(event, cs->andsw, -MAX_SWITCH, MAX_SWITCH);
|
||||
break;
|
||||
@@ -3406,6 +3404,15 @@ void menuModelCustomSwitches(uint8_t event)
|
||||
|
||||
void menuModelCustomSwitches(uint8_t event)
|
||||
{
|
||||
#if defined(CPUM64)
|
||||
#define INCDEC_SET_FLAG(f)
|
||||
#define CHECK_INCDEC_CSPARAM(event, var, min, max) CHECK_INCDEC_MODELVAR(event, var, min, max)
|
||||
#else
|
||||
uint8_t incdecFlag;
|
||||
#define INCDEC_SET_FLAG(f) incdecFlag = (EE_MODEL|(f))
|
||||
#define CHECK_INCDEC_CSPARAM(event, var, min, max) var=checkIncDec(event,var,min,max,incdecFlag)
|
||||
#endif
|
||||
|
||||
MENU(STR_MENUCUSTOMSWITCHES, menuTabModel, e_CustomSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|CSW_FIELD_LAST/*repeated...*/});
|
||||
|
||||
uint8_t y = 0;
|
||||
@@ -3440,14 +3447,19 @@ void menuModelCustomSwitches(uint8_t event)
|
||||
putsSwitches(CSW_3RD_COLUMN-3*FW, y, cs->v2, m_posHorz==2 ? attr : 0);
|
||||
v1_min = SWSRC_OFF+1; v1_max = SWSRC_ON-1;
|
||||
v2_min = SWSRC_OFF+1; v2_max = SWSRC_ON-1;
|
||||
INCDEC_SET_FLAG(INCDEC_SWITCH);
|
||||
}
|
||||
else if (cstate == CS_VCOMP) {
|
||||
putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, m_posHorz==1 ? attr : 0);
|
||||
putsMixerSource(CSW_3RD_COLUMN-3*FW, y, cs->v2, m_posHorz==2 ? attr : 0);
|
||||
INCDEC_SET_FLAG(INCDEC_SOURCE);
|
||||
}
|
||||
else {
|
||||
putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, (m_posHorz==1 ? attr : 0));
|
||||
|
||||
if (m_posHorz == 1)
|
||||
INCDEC_SET_FLAG(INCDEC_SOURCE);
|
||||
else
|
||||
INCDEC_SET_FLAG(0);
|
||||
#if defined(FRSKY)
|
||||
if (cs->v1 >= MIXSRC_FIRST_TELEM) {
|
||||
putsTelemetryChannel(CSW_3RD_COLUMN, y, cs->v1 - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), m_posHorz==2 ? attr : 0);
|
||||
@@ -3500,14 +3512,14 @@ void menuModelCustomSwitches(uint8_t event)
|
||||
}
|
||||
break;
|
||||
case CSW_FIELD_V1:
|
||||
CHECK_INCDEC_MODELVAR(event, cs->v1, v1_min, v1_max);
|
||||
CHECK_INCDEC_CSPARAM(event, cs->v1, v1_min, v1_max);
|
||||
break;
|
||||
case CSW_FIELD_V2:
|
||||
CHECK_INCDEC_MODELVAR(event, cs->v2, v2_min, v2_max);
|
||||
CHECK_INCDEC_CSPARAM(event, cs->v2, v2_min, v2_max);
|
||||
break;
|
||||
case CSW_FIELD_ANDSW:
|
||||
#if defined(PCBTARANIS)
|
||||
CHECK_INCDEC_MODELVAR(event, cs->andsw, -MAX_CSW_ANDSW, MAX_CSW_ANDSW);
|
||||
#if defined(CPUARM)
|
||||
CHECK_INCDEC_MODELSWITCH(event, cs->andsw, -MAX_CSW_ANDSW, MAX_CSW_ANDSW);
|
||||
#else
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, cs->andsw, MAX_CSW_ANDSW);
|
||||
#endif
|
||||
@@ -3575,7 +3587,7 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
k = i+s_pgOfs;
|
||||
|
||||
#if LCD_W >= 212
|
||||
putsStrIdx(0, y, PSTR("CF"), k+1, (sub==k && m_posHorz<0) ? INVERS : 0);
|
||||
putsStrIdx(0, y, STR_CF, k+1, (sub==k && m_posHorz<0) ? INVERS : 0);
|
||||
#endif
|
||||
|
||||
CustomFnData *sd = &g_model.funcSw[k];
|
||||
|
||||
+15
-5
@@ -893,7 +893,7 @@ const char * displayMenu(uint8_t event)
|
||||
const char * result = NULL;
|
||||
|
||||
uint8_t display_count = min(s_menu_count, (uint16_t)MENU_MAX_LINES);
|
||||
uint8_t y = display_count > 4 ? MENU_Y - FH : MENU_Y;
|
||||
uint8_t y = (display_count >= 5 ? MENU_Y - FH : MENU_Y);
|
||||
lcd_filled_rect(MENU_X, y, MENU_W, display_count * (FH+1) + 2, SOLID, ERASE);
|
||||
lcd_rect(MENU_X, y, MENU_W, display_count * (FH+1) + 2);
|
||||
|
||||
@@ -910,29 +910,39 @@ const char * displayMenu(uint8_t event)
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
CASE_EVT_ROTARY_LEFT
|
||||
#endif
|
||||
case EVT_KEY_BREAK(KEY_MOVE_UP):
|
||||
if (s_menu_item > 0)
|
||||
case EVT_KEY_FIRST(KEY_MOVE_UP):
|
||||
case EVT_KEY_REPT(KEY_MOVE_UP):
|
||||
if (s_menu_item > 0) {
|
||||
s_menu_item--;
|
||||
}
|
||||
#if defined(SDCARD)
|
||||
else if (s_menu_offset > 0) {
|
||||
s_menu_offset--;
|
||||
result = STR_UPDATE_LIST;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
s_menu_item = display_count - 1;
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
CASE_EVT_ROTARY_RIGHT
|
||||
#endif
|
||||
case EVT_KEY_BREAK(KEY_MOVE_DOWN):
|
||||
if (s_menu_item < display_count - 1 && s_menu_offset + s_menu_item + 1 < s_menu_count)
|
||||
case EVT_KEY_FIRST(KEY_MOVE_DOWN):
|
||||
case EVT_KEY_REPT(KEY_MOVE_DOWN):
|
||||
if (s_menu_item < display_count - 1 && s_menu_offset + s_menu_item + 1 < s_menu_count) {
|
||||
s_menu_item++;
|
||||
}
|
||||
#if defined(SDCARD)
|
||||
else if (s_menu_count > s_menu_offset + display_count) {
|
||||
s_menu_offset++;
|
||||
result = STR_UPDATE_LIST;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
s_menu_item = 0;
|
||||
}
|
||||
break;
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
|
||||
@@ -275,11 +275,6 @@ void displayWarning(uint8_t event);
|
||||
#else
|
||||
#define MENU_ADD_SD_ITEM(s)
|
||||
#endif
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#define MENU_ADD_NAVIGATION_ITEM(s) MENU_ADD_ITEM(s)
|
||||
#else
|
||||
#define MENU_ADD_NAVIGATION_ITEM(s)
|
||||
#endif
|
||||
#define MENU_LINE_LENGTH (LEN_MODEL_NAME+1)
|
||||
extern const char *s_menu[MENU_MAX_LINES];
|
||||
extern uint16_t s_menu_count;
|
||||
|
||||
+5
-1
@@ -234,6 +234,7 @@ void per10ms()
|
||||
#endif
|
||||
|
||||
if (lightOffCounter) lightOffCounter--;
|
||||
if (flashCounter) flashCounter--;
|
||||
if (s_noHi) s_noHi--;
|
||||
if (trimsCheckTimer) trimsCheckTimer --;
|
||||
|
||||
@@ -1456,7 +1457,9 @@ void checkBacklight()
|
||||
backlightOn();
|
||||
}
|
||||
|
||||
if (g_eeGeneral.backlightMode == e_backlight_mode_on || lightOffCounter || isFunctionActive(FUNC_BACKLIGHT))
|
||||
bool backlightOn = (g_eeGeneral.backlightMode == e_backlight_mode_on || lightOffCounter || isFunctionActive(FUNC_BACKLIGHT));
|
||||
if (flashCounter) backlightOn = !backlightOn;
|
||||
if (backlightOn)
|
||||
BACKLIGHT_ON();
|
||||
else
|
||||
BACKLIGHT_OFF();
|
||||
@@ -1974,6 +1977,7 @@ void getADC_bandgap()
|
||||
|
||||
uint8_t g_vbat100mV = 0;
|
||||
uint16_t lightOffCounter;
|
||||
uint8_t flashCounter = 0;
|
||||
|
||||
uint16_t s_timeCumTot;
|
||||
uint16_t s_timeCumThr; // THR in 1/16 sec
|
||||
|
||||
@@ -1066,6 +1066,7 @@ extern int16_t calibratedStick[NUM_STICKS+NUM_POTS];
|
||||
|
||||
extern uint8_t beepAgain;
|
||||
extern uint16_t lightOffCounter;
|
||||
extern uint8_t flashCounter;
|
||||
extern uint8_t mixWarning;
|
||||
|
||||
extern PhaseData *phaseaddress(uint8_t idx);
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ typedef const uint8_t pm_uint8_t;
|
||||
typedef const int16_t pm_int16_t;
|
||||
typedef const int8_t pm_int8_t;
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBACT)
|
||||
#if defined(PCBTARANIS)
|
||||
extern GPIO_TypeDef gpioa;
|
||||
#undef GPIOA
|
||||
#define GPIOA (&gpioa)
|
||||
|
||||
@@ -297,6 +297,7 @@ const pm_char STR_MENUTEMPLATES[] PROGMEM = TR_MENUTEMPLATES;
|
||||
|
||||
const pm_char STR_MENUSTAT[] PROGMEM = TR_MENUSTAT;
|
||||
const pm_char STR_MENUDEBUG[] PROGMEM = TR_MENUDEBUG;
|
||||
const pm_char STR_MENUGLOBALVARS[] PROGMEM = "GLOBAL VARIABLES";
|
||||
|
||||
#if defined(DSM2) || defined(PXX)
|
||||
const pm_char STR_RXNUM[] PROGMEM = TR_RXNUM;
|
||||
@@ -313,6 +314,8 @@ const pm_char STR_FAILSAFESET[] PROGMEM = TR_FAILSAFESET;
|
||||
#endif
|
||||
|
||||
const pm_char STR_INVERT_THR[] PROGMEM = TR_INVERT_THR;
|
||||
const pm_char STR_AND_SWITCH[] PROGMEM = "AND Switch";
|
||||
extern const pm_char STR_CF[] PROGMEM = "CF";
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
const pm_char STR_MINRSSI[] PROGMEM = TR_MINRSSI;
|
||||
@@ -356,6 +359,8 @@ const pm_char STR_RESET_TELEMETRY[] PROGMEM = "Reset Telemetry";
|
||||
const pm_char STR_STATISTICS[] PROGMEM = "Statistics";
|
||||
#endif
|
||||
|
||||
const pm_char STR_RESET[] PROGMEM = "[Reset]";
|
||||
|
||||
#if defined(SDCARD)
|
||||
const pm_char STR_BACKUP_MODEL[] PROGMEM = TR_BACKUP_MODEL;
|
||||
const pm_char STR_RESTORE_MODEL[] PROGMEM = TR_RESTORE_MODEL;
|
||||
|
||||
@@ -407,7 +407,10 @@ extern const pm_char STR_MENUTELEMETRY[];
|
||||
extern const pm_char STR_MENUTEMPLATES[];
|
||||
extern const pm_char STR_MENUSTAT[];
|
||||
extern const pm_char STR_MENUDEBUG[];
|
||||
extern const pm_char STR_MENUGLOBALVARS[];
|
||||
extern const pm_char STR_INVERT_THR[];
|
||||
extern const pm_char STR_AND_SWITCH[];
|
||||
extern const pm_char STR_CF[];
|
||||
|
||||
#if defined(DSM2) || defined(PXX)
|
||||
extern const pm_char STR_RXNUM[];
|
||||
@@ -472,6 +475,8 @@ extern const pm_char STR_CURRENT[];
|
||||
extern const pm_char STR_STATISTICS[];
|
||||
#endif
|
||||
|
||||
extern const pm_char STR_RESET[];
|
||||
|
||||
#if defined(SDCARD)
|
||||
extern const pm_char STR_BACKUP_MODEL[];
|
||||
extern const pm_char STR_RESTORE_MODEL[];
|
||||
|
||||
Reference in New Issue
Block a user