1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-22 07:45:14 +03:00

make code compatible with up-to-date build environment

These changes make it possible to compile open9x with old (avr-gcc 4.3.3, 
avr-libc 1.6.7) and up-to-date (avr-gcc 4.6.2, avr-libc 1.8.0) build
environments. See Issue 1 for more details.
This commit is contained in:
mihlit@mihlit.cz 2012-02-02 11:23:38 +00:00
parent 973b91cd3f
commit acd523e699
21 changed files with 418 additions and 400 deletions

View file

@ -126,7 +126,7 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max)
return checkIncDec(event,i_val,i_min,i_max,EE_GENERAL);
}
bool check_simple(uint8_t event, uint8_t curr, MenuFuncP *menuTab, uint8_t menuTabSize, uint8_t maxrow)
bool check_simple(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, uint8_t maxrow)
{
return check(event, curr, menuTab, menuTabSize, 0, 0, maxrow);
}
@ -142,7 +142,7 @@ bool check_submenu_simple(uint8_t event, uint8_t maxrow)
#define MAXCOL(row) (horTab ? pgm_read_byte(horTab+min(row, horTabMax)) : (const uint8_t)0)
#define INC(val,max) if(val<max) {val++;} else {val=0;}
#define DEC(val,max) if(val>0 ) {val--;} else {val=max;}
bool check(uint8_t event, uint8_t curr, MenuFuncP *menuTab, uint8_t menuTabSize, prog_uint8_t *horTab, uint8_t horTabMax, uint8_t maxrow)
bool check(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, uint8_t maxrow)
{
#ifdef NAVIGATION_RE1
// check rotary encoder 1 if changed -> cursor down/up