1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 01:05:10 +03:00

Inflight parameters modification using Rotary Encoder on v4 (not finished yet).

This commit is contained in:
bsongis 2012-02-18 08:58:05 +00:00
parent 9997b8c599
commit 33e30b8fef
10 changed files with 92 additions and 36 deletions

View file

@ -99,19 +99,11 @@ const MenuFuncP_PROGMEM menuTabModel[] PROGMEM = {
#endif
};
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);
lcd_rect(10, 16, 108, 40);
lcd_puts(16, 3*FH, s_warning);
// could be a place for a s_warning_info
}
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 displayPopup(const pm_char * pstr)
{
@ -1603,20 +1595,15 @@ void menuProcLimits(uint8_t event)
}
break;
case 1:
lcd_outdezAtt( 12*FW, y, (int8_t)(ld->min-100), attr);
lcd_outdezAtt(12*FW, y, (int8_t)(ld->min-100), attr | INFLIGHT(ld->min));
if (active) {
ld->min -= 100;
CHECK_INCDEC_MODELVAR( event, ld->min, -limit, limit);
ld->min += 100;
// CHECK_INFLIGHT_INCDEC(ld->min, -125, 125, PSTR("Min Limit"), EE_MODEL);
CHECK_INFLIGHT_INCDEC_MODELVAR(event, ld->min, -limit, limit, +100, STR_MINLIMIT);
}
break;
case 2:
lcd_outdezAtt( 17*FW, y, (int8_t)(ld->max+100), attr);
lcd_outdezAtt(17*FW, y, (int8_t)(ld->max+100), attr | INFLIGHT(ld->max));
if (active) {
ld->max += 100;
CHECK_INCDEC_MODELVAR( event, ld->max, -limit, limit);
ld->max -= 100;
CHECK_INFLIGHT_INCDEC_MODELVAR(event, ld->max, -limit, limit, -100, STR_MAXLIMIT);
}
break;
case 3: