1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-20 23:05:12 +03:00

Soft Power Switch on both v4.1 and ersky9x boards

Delay before effective EEPROM write on these boards
Current displayed
This commit is contained in:
bsongis 2012-03-30 16:03:43 +00:00
parent 6113420a02
commit e7eaced156
24 changed files with 501 additions and 165 deletions

View file

@ -473,6 +473,11 @@ void pushMenu(MenuFuncP newMenu)
}
const pm_char * s_warning = 0;
const pm_char * s_warning_info;
uint8_t s_warning_info_len;
// uint8_t s_warning_info_att not needed now
uint8_t s_confirmation = 0;
void displayBox()
{
lcd_filled_rect(10, 16, 108, 40, SOLID, WHITE);
@ -481,6 +486,47 @@ void displayBox()
// could be a place for a s_warning_info
}
void displayPopup(const pm_char * pstr)
{
s_warning = pstr;
displayBox();
s_warning = 0;
refreshDisplay();
}
void displayWarning(uint8_t event)
{
if (s_warning) {
displayBox();
lcd_puts(16, 5*FH, STR_EXIT);
switch(event) {
case EVT_KEY_FIRST(KEY_EXIT):
killEvents(event);
s_warning = 0;
break;
}
}
}
void displayConfirmation(uint8_t event)
{
s_confirmation = false;
displayBox();
if (s_warning_info)
lcd_putsnAtt(16, 4*FH, s_warning_info, s_warning_info_len, ZCHAR);
lcd_puts(16, 5*FH, STR_POPUPS);
switch(event) {
case EVT_KEY_FIRST(KEY_MENU):
s_confirmation = true;
// no break
case EVT_KEY_FIRST(KEY_EXIT):
killEvents(event);
s_warning = 0;
break;
}
}
#ifdef NAVIGATION_RE1
int8_t *s_inflight_value = NULL;
int8_t s_inflight_min;