1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +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

@ -32,7 +32,7 @@ uint8_t hapticTick = 0;
#endif
// The various "beep" tone lengths
static prog_uint8_t APM beepTab[]= {
static const pm_uint8_t beepTab[] PROGMEM = {
// 0 1 2 3 4
0, 1, 8, 30, 100, //silent
1, 1, 8, 30, 100, //xShort

View file

@ -402,7 +402,7 @@ void per10ms()
// Trim switches ...
#if defined (PCBV4)
static prog_uchar APM crossTrim[]={
static const pm_uchar crossTrim[] PROGMEM ={
1<<INP_J_TRM_LH_DWN,
1<<INP_J_TRM_LH_UP,
1<<INP_J_TRM_LV_DWN,
@ -413,7 +413,7 @@ void per10ms()
1<<INP_J_TRM_RH_UP
};
#else // stock original board ...
static prog_uchar APM crossTrim[]={
static const pm_uchar crossTrim[] PROGMEM ={
1<<INP_D_TRM_LH_DWN, // bit 7
1<<INP_D_TRM_LH_UP,
1<<INP_D_TRM_LV_DWN,

View file

@ -1,4 +1,4 @@
prog_uchar APM font[] = {
const pm_uchar font[] PROGMEM = {
80,8,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x00,0x00,0x07,0x00,0x07,0x00,0x14,0x7f,0x14,0x7f,0x14,0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62,0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00,0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00,0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08,0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02,
0x00,0x3e,0x41,0x41,0x3e,0x00,0x00,0x42,0x7f,0x40,0x00,0x62,0x51,0x49,0x46,0x00,0x41,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7f,0x00,0x27,0x45,0x45,0x39,0x00,0x3e,0x49,0x49,0x32,0x00,0x01,0x79,0x05,0x03,0x00,0x36,0x49,0x49,0x36,0x00,0x06,0x49,0x29,0x1e,0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00,0x08,0x14,0x22,0x41,0x14,0x14,0x14,0x14,0x14,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x51,0x09,0x06,

View file

@ -1,4 +1,4 @@
prog_uchar APM font_dblsize[] = {
const pm_uchar font_dblsize[] PROGMEM = {
160,96,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x7e,0x00,0x00,0x7e,0x3e,0x00,0x00,0x60,0x60,0xfe,0xfe,0x60,0x60,0xfe,0xfe,0x60,0x60,0x60,0xf0,0x98,0x98,0xfe,0xfe,0x98,0x98,0x18,0x18,0x0c,0x1e,0x1e,0x0c,0x80,0xc0,0xe0,0x70,0x38,0x18,0x78,0xfc,0x8e,0xc6,0xe6,0x76,0x3c,0x18,0x00,0x00,0x00,0x00,0x66,0x76,0x3e,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xf0,0x38,0x1c,0x0e,0x06,0x00,0x00,0x00,0x00,0x06,0x0e,0x1c,0x38,0xf0,0xe0,0x00,0x00,0x60,0x60,0xc0,0x80,0xf8,0xf8,0x80,0xc0,0x60,0x60,0x80,0x80,0x80,0x80,0xf8,0xf8,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x18,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x71,0x71,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x7f,0x7f,0x06,0x06,0x7f,0x7f,0x06,0x06,0x18,0x18,0x19,0x19,0x7f,0x7f,0x19,0x19,0x0f,0x06,0x18,0x1c,0x0e,0x07,0x03,0x01,0x30,0x78,0x78,0x30,0x1e,0x3f,0x71,0x63,0x67,0x66,0x3c,0x3c,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0f,0x1c,0x38,0x70,0x60,0x00,0x00,0x00,0x00,0x60,0x70,0x38,0x1c,0x0f,0x07,0x00,0x00,0x06,0x06,0x03,0x01,0x1f,0x1f,0x01,0x03,0x06,0x06,0x01,0x01,0x01,0x01,0x1f,0x1f,0x01,0x01,0x01,0x01,0x00,0x00,0x66,0x76,0x3e,0x1e,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x30,0x78,0x78,0x30,0x00,0x00,0x00,0x00,0x18,0x1c,0x0e,0x07,0x03,0x01,0x00,0x00,0x00,0x00,

View file

@ -44,7 +44,7 @@ void menuProcDiagKeys(uint8_t event);
void menuProcDiagAna(uint8_t event);
void menuProcDiagCalib(uint8_t event);
MenuFuncP_PROGMEM APM menuTabDiag[] = {
const MenuFuncP_PROGMEM menuTabDiag[] PROGMEM = {
menuProcSetup,
#if defined(PCBV4)
menuProcTime,

View file

@ -39,9 +39,9 @@ void lcd_clear()
memset(displayBuf, 0, sizeof(displayBuf));
}
void lcd_img(uint8_t x, uint8_t y, const prog_uchar * img, uint8_t idx, uint8_t mode)
void lcd_img(uint8_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode)
{
const prog_uchar *q = img;
const pm_uchar *q = img;
uint8_t w = pgm_read_byte(q++);
uint8_t hb = (pgm_read_byte(q++)+7)/8;
bool inv = (mode & INVERS) ? true : (mode & BLINK ? BLINK_ON_PHASE : false);
@ -61,7 +61,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const char c, uint8_t mode)
{
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
prog_uchar *q = &font_5x8_x20_x7f[ + (c-0x20)*5];
const pm_uchar *q = &font_5x8_x20_x7f[ + (c-0x20)*5];
bool inv = (mode & INVERS) ? true : (mode & BLINK ? BLINK_ON_PHASE : false);
if(mode & DBLSIZE)
{
@ -121,7 +121,7 @@ void lcd_putc(uint8_t x,uint8_t y,const char c)
lcd_putcAtt(x,y,c,0);
}
void lcd_putsnAtt(uint8_t x,uint8_t y,const prog_char * s,uint8_t len,uint8_t mode)
void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t len,uint8_t mode)
{
while(len!=0) {
char c;
@ -143,12 +143,12 @@ void lcd_putsnAtt(uint8_t x,uint8_t y,const prog_char * s,uint8_t len,uint8_t mo
len--;
}
}
void lcd_putsn_P(uint8_t x,uint8_t y,const prog_char * s,uint8_t len)
void lcd_putsn_P(uint8_t x,uint8_t y,const pm_char * s,uint8_t len)
{
lcd_putsnAtt(x, y, s, len, 0);
}
void lcd_putsAtt(uint8_t x,uint8_t y,const prog_char * s,uint8_t mode)
void lcd_putsAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t mode)
{
while(1) {
char c = (mode & BSS) ? *s++ : pgm_read_byte(s++);
@ -160,7 +160,7 @@ void lcd_putsAtt(uint8_t x,uint8_t y,const prog_char * s,uint8_t mode)
lcd_lastPos = x;
}
void lcd_puts_P(uint8_t x,uint8_t y,const prog_char * s)
void lcd_puts_P(uint8_t x,uint8_t y,const pm_char * s)
{
lcd_putsAtt( x, y, s, 0);
}
@ -396,7 +396,7 @@ void putsVBat(uint8_t x, uint8_t y, uint8_t att)
putsVolts(x, y, g_vbat100mV, att);
}
void putsStrIdx(uint8_t x, uint8_t y, const prog_char *str, uint8_t idx, uint8_t att)
void putsStrIdx(uint8_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att)
{
lcd_putsAtt(x, y, str, att & ~BSS); // TODO use something else than BSS for LEADING0
lcd_outdezNAtt(lcd_lastPos, y, idx, att|LEFT, 2);

View file

@ -70,10 +70,10 @@ extern uint8_t lcd_lastPos;
extern void lcd_putc(unsigned char x,unsigned char y,const char c);
extern void lcd_putcAtt(unsigned char x,unsigned char y,const char c,uint8_t mode);
extern void lcd_putsAtt(unsigned char x,unsigned char y,const prog_char * s,uint8_t mode);
extern void lcd_putsnAtt(unsigned char x,unsigned char y,const prog_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts_P(unsigned char x,unsigned char y,const prog_char * s);
extern void lcd_putsn_P(unsigned char x,unsigned char y,const prog_char * s,unsigned char len);
extern void lcd_putsAtt(unsigned char x,unsigned char y,const pm_char * s,uint8_t mode);
extern void lcd_putsnAtt(unsigned char x,unsigned char y,const pm_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts_P(unsigned char x,unsigned char y,const pm_char * s);
extern void lcd_putsn_P(unsigned char x,unsigned char y,const pm_char * s,unsigned char len);
extern void lcd_outhex4(unsigned char x,unsigned char y,uint16_t val);
@ -81,7 +81,7 @@ extern void lcd_outdezAtt(uint8_t x, uint8_t y, int16_t val, uint8_t mode=0);
extern void lcd_outdezNAtt(uint8_t x, uint8_t y, int16_t val, uint8_t mode=0, uint8_t len=0);
extern void lcd_outdez8(uint8_t x, uint8_t y, int8_t val);
extern void putsStrIdx(uint8_t x, uint8_t y, const prog_char *str, uint8_t idx, uint8_t att=0);
extern void putsStrIdx(uint8_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att=0);
extern void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att);
extern void putsSwitches(uint8_t x, uint8_t y, int8_t swtch, uint8_t att=0);
@ -122,7 +122,7 @@ inline void lcd_square(uint8_t x, uint8_t y, uint8_t w, uint8_t att=0) { lcd_rec
lcd_vline(xx ,yy-ll,ll); \
lcd_vline(xx+1,yy-ll,ll);
extern void lcd_img(uint8_t x, uint8_t y, const prog_uchar * img, uint8_t idx, uint8_t mode);
extern void lcd_img(uint8_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode);
extern void lcdSetRefVolt(unsigned char val);
extern void lcd_init();
extern void lcd_clear();

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

View file

@ -91,18 +91,18 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max);
extern uint8_t m_posVert;
extern uint8_t m_posHorz;
inline void minit(){m_posVert=m_posHorz=0;}
bool check(uint8_t event, uint8_t curr, MenuFuncP *menuTab, uint8_t menuTabSize, prog_uint8_t *subTab, uint8_t subTabMax, uint8_t maxrow);
bool check_simple(uint8_t event, uint8_t curr, MenuFuncP *menuTab, uint8_t menuTabSize, uint8_t maxrow);
bool check(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *subTab, uint8_t subTabMax, uint8_t maxrow);
bool check_simple(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, uint8_t maxrow);
bool check_submenu_simple(uint8_t event, uint8_t maxrow);
typedef PROGMEM void (*MenuFuncP_PROGMEM)(uint8_t event);
typedef void (*MenuFuncP_PROGMEM)(uint8_t event);
#define TITLEP(pstr) lcd_putsAtt(0,0,pstr,INVERS)
#define TITLE(str) TITLEP(str)
#define MENU(title, tab, menu, lines_count, ...) \
TITLE(title); \
static prog_uint8_t APM mstate_tab[] = __VA_ARGS__; \
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
if (!check(event,menu,tab,DIM(tab),mstate_tab,DIM(mstate_tab)-1,lines_count-1)) return;
#define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \
@ -114,7 +114,7 @@ SIMPLE_MENU_NOTITLE(tab, menu, lines_count)
#define SUBMENU(title, lines_count, ...) \
TITLE(title); \
static prog_uint8_t APM mstate_tab[] = __VA_ARGS__; \
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
if (!check(event,0,NULL,0,mstate_tab,DIM(mstate_tab)-1,lines_count-1)) return;
#define SIMPLE_SUBMENU_NOTITLE(lines_count) \

View file

@ -69,7 +69,7 @@ void menuProcTemplates(uint8_t event);
#endif
void menuProcExpoOne(uint8_t event);
MenuFuncP_PROGMEM APM menuTabModel[] = {
const MenuFuncP_PROGMEM menuTabModel[] PROGMEM = {
menuProcModelSelect,
menuProcModel,
#ifdef HELI
@ -91,8 +91,8 @@ MenuFuncP_PROGMEM APM menuTabModel[] = {
#endif
};
const prog_char * s_warning = 0;
const prog_char * s_warning_info;
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;
@ -105,7 +105,7 @@ void displayBox()
// could be a place for a s_warning_info
}
void displayPopup(const prog_char * pstr)
void displayPopup(const pm_char * pstr)
{
s_warning = pstr;
displayBox();

View file

@ -1,7 +1,7 @@
#include "open9x.h"
// The non-0-terminated-strings
const prog_char APM STR_OPEN9X[] =
const pm_char STR_OPEN9X[] PROGMEM =
TR_OFFON
TR_MMMINV
TR_NCHANNELS
@ -49,198 +49,198 @@ const prog_char APM STR_OPEN9X[] =
;
// The 0-terminated-strings
const prog_char APM STR_POPUPS[] = TR_POPUPS;
const prog_char APM STR_MENUWHENDONE[] = TR_MENUWHENDONE;
const prog_char APM STR_FREE[] = TR_FREE;
const prog_char APM STR_DELETEMODEL[] = TR_DELETEMODEL;
const prog_char APM STR_COPYINGMODEL[] = TR_COPYINGMODEL;
const prog_char APM STR_MOVINGMODEL[] = TR_MOVINGMODEL;
const prog_char APM STR_LOADINGMODEL[] = TR_LOADINGMODEL;
const prog_char APM STR_NAME[] = TR_NAME;
const prog_char APM STR_TIMER[] = TR_TIMER;
const prog_char APM STR_ELIMITS[] = TR_ELIMITS;
const prog_char APM STR_ETRIMS[] = TR_ETRIMS;
const prog_char APM STR_TRIMINC[] = TR_TRIMINC;
const prog_char APM STR_TTRACE[] = TR_TTRACE;
const prog_char APM STR_TTRIM[] = TR_TTRIM;
const prog_char APM STR_BEEPCTR[] = TR_BEEPCTR;
const prog_char APM STR_PROTO[] = TR_PROTO;
const prog_char APM STR_PPMFRAME[] = TR_PPMFRAME;
const prog_char APM STR_MS[] = TR_MS;
const prog_char APM STR_SWITCH[] = TR_SWITCH;
const prog_char APM STR_TRIMS[] = TR_TRIMS;
const prog_char APM STR_FADEIN[] = TR_FADEIN;
const prog_char APM STR_FADEOUT[] = TR_FADEOUT;
const prog_char APM STR_DEFAULT[] = TR_DEFAULT;
const prog_char APM STR_CHECKTRIMS[] = TR_CHECKTRIMS;
const pm_char STR_POPUPS[] PROGMEM = TR_POPUPS;
const pm_char STR_MENUWHENDONE[] PROGMEM = TR_MENUWHENDONE;
const pm_char STR_FREE[] PROGMEM = TR_FREE;
const pm_char STR_DELETEMODEL[] PROGMEM = TR_DELETEMODEL;
const pm_char STR_COPYINGMODEL[] PROGMEM = TR_COPYINGMODEL;
const pm_char STR_MOVINGMODEL[] PROGMEM = TR_MOVINGMODEL;
const pm_char STR_LOADINGMODEL[] PROGMEM = TR_LOADINGMODEL;
const pm_char STR_NAME[] PROGMEM = TR_NAME;
const pm_char STR_TIMER[] PROGMEM = TR_TIMER;
const pm_char STR_ELIMITS[] PROGMEM = TR_ELIMITS;
const pm_char STR_ETRIMS[] PROGMEM = TR_ETRIMS;
const pm_char STR_TRIMINC[] PROGMEM = TR_TRIMINC;
const pm_char STR_TTRACE[] PROGMEM = TR_TTRACE;
const pm_char STR_TTRIM[] PROGMEM = TR_TTRIM;
const pm_char STR_BEEPCTR[] PROGMEM = TR_BEEPCTR;
const pm_char STR_PROTO[] PROGMEM = TR_PROTO;
const pm_char STR_PPMFRAME[] PROGMEM = TR_PPMFRAME;
const pm_char STR_MS[] PROGMEM = TR_MS;
const pm_char STR_SWITCH[] PROGMEM = TR_SWITCH;
const pm_char STR_TRIMS[] PROGMEM = TR_TRIMS;
const pm_char STR_FADEIN[] PROGMEM = TR_FADEIN;
const pm_char STR_FADEOUT[] PROGMEM = TR_FADEOUT;
const pm_char STR_DEFAULT[] PROGMEM = TR_DEFAULT;
const pm_char STR_CHECKTRIMS[] PROGMEM = TR_CHECKTRIMS;
#ifdef HELI
const prog_char APM STR_SWASHTYPE[] = TR_SWASHTYPE;
const prog_char APM STR_COLLECTIVE[] = TR_COLLECTIVE;
const prog_char APM STR_SWASHRING[] = TR_SWASHRING;
const prog_char APM STR_ELEDIRECTION[] = TR_ELEDIRECTION;
const prog_char APM STR_AILDIRECTION[] = TR_AILDIRECTION;
const prog_char APM STR_COLDIRECTION[] = TR_COLDIRECTION;
const pm_char STR_SWASHTYPE[] PROGMEM = TR_SWASHTYPE;
const pm_char STR_COLLECTIVE[] PROGMEM = TR_COLLECTIVE;
const pm_char STR_SWASHRING[] PROGMEM = TR_SWASHRING;
const pm_char STR_ELEDIRECTION[] PROGMEM = TR_ELEDIRECTION;
const pm_char STR_AILDIRECTION[] PROGMEM = TR_AILDIRECTION;
const pm_char STR_COLDIRECTION[] PROGMEM = TR_COLDIRECTION;
#endif
const prog_char APM STR_MODE[] = TR_MODE;
const prog_char APM STR_NOFREEEXPO[] = TR_NOFREEEXPO;
const prog_char APM STR_NOFREEMIXER[] = TR_NOFREEMIXER;
const prog_char APM STR_INSERTMIX[] = TR_INSERTMIX;
const prog_char APM STR_EDITMIX[] = TR_EDITMIX;
const prog_char APM STR_SOURCE[] = TR_SOURCE;
const prog_char APM STR_WEIGHT[] = TR_WEIGHT;
const prog_char APM STR_OFFSET[] = TR_OFFSET;
const prog_char APM STR_TRIM[] = TR_TRIM;
const prog_char APM STR_CURVES[] = TR_CURVES;
const prog_char APM STR_FPHASE[] = TR_FPHASE;
const prog_char APM STR_WARNING[] = TR_WARNING;
const prog_char APM STR_OFF[] = TR_OFF;
const prog_char APM STR_MULTPX[] = TR_MULTPX;
const prog_char APM STR_DELAYDOWN[] = TR_DELAYDOWN;
const prog_char APM STR_DELAYUP[] = TR_DELAYUP;
const prog_char APM STR_SLOWDOWN[] = TR_SLOWDOWN;
const prog_char APM STR_SLOWUP[] = TR_SLOWUP;
const prog_char APM STR_DREXPO[] = TR_DREXPO;
const prog_char APM STR_MIXER[] = TR_MIXER;
const prog_char APM STR_COPYTRIMMENU[] = TR_COPYTRIMMENU;
const prog_char APM STR_CV[] = TR_CV;
const prog_char APM STR_SW[] = TR_SW;
const prog_char APM STR_ACHANNEL[] = TR_ACHANNEL;
const prog_char APM STR_MAX[] = TR_MAX;
const prog_char APM STR_CALIB[] = TR_CALIB;
const prog_char APM STR_BAR[] = TR_BAR;
const prog_char APM STR_ALARM[] = TR_ALARM;
const prog_char APM STR_USRPROTO[] = TR_USRPROTO;
const prog_char APM STR_CLEARMIXMENU[] = TR_CLEARMIXMENU;
const prog_char APM STR_BEEPER[] = TR_BEEPER;
const prog_char APM STR_CONTRAST[] = TR_CONTRAST;
const prog_char APM STR_BATTERYWARNING[] = TR_BATTERYWARNING;
const prog_char APM STR_INACTIVITYALARM[] = TR_INACTIVITYALARM;
const prog_char APM STR_FILTERADC[] = TR_FILTERADC;
const prog_char APM STR_THROTTLEREVERSE[] = TR_THROTTLEREVERSE;
const prog_char APM STR_MINUTEBEEP[] = TR_MINUTEBEEP;
const prog_char APM STR_BEEPCOUNTDOWN[] = TR_BEEPCOUNTDOWN;
const prog_char APM STR_FLASHONBEEP[] = TR_FLASHONBEEP;
const prog_char APM STR_LIGHTSWITCH[] = TR_LIGHTSWITCH;
const prog_char APM STR_LIGHTOFFAFTER[] = TR_LIGHTOFFAFTER;
const prog_char APM STR_SPLASHSCREEN[] = TR_SPLASHSCREEN;
const prog_char APM STR_THROTTLEWARNING[] = TR_THROTTLEWARNING;
const prog_char APM STR_SWITCHWARNING[] = TR_SWITCHWARNING;
const prog_char APM STR_MEMORYWARNING[] = TR_MEMORYWARNING;
const prog_char APM STR_ALARMWARNING[] = TR_ALARMWARNING;
const prog_char APM STR_NODATAALARM[] = TR_NODATAALARM;
const prog_char APM STR_RXCHANNELORD[] = TR_RXCHANNELORD;
const prog_char APM STR_MODE2[] = TR_MODE2;
const prog_char APM STR_SLAVE[] = TR_SLAVE;
const prog_char APM STR_MODESRC[] = TR_MODESRC;
const prog_char APM STR_MULTIPLIER[] = TR_MULTIPLIER;
const prog_char APM STR_CAL[] = TR_CAL;
const prog_char APM STR_EEPROMV[] = TR_EEPROMV;
const prog_char APM STR_VTRIM[] = TR_VTRIM;
const prog_char APM STR_BG[] = TR_BG;
const prog_char APM STR_MENUTOSTART[] = TR_MENUTOSTART;
const prog_char APM STR_SETMIDPOINT[] = TR_SETMIDPOINT;
const prog_char APM STR_MOVESTICKSPOTS[] = TR_MOVESTICKSPOTS;
const prog_char APM STR_ALT[] = TR_ALT;
const prog_char APM STR_RXBATT[] = TR_RXBATT;
const prog_char APM STR_RX[] = TR_RX;
const prog_char APM STR_TX[] = TR_TX;
const prog_char APM STR_HDG[] = TR_HDG;
const prog_char APM STR_SPD[] = TR_SPD;
const prog_char APM STR_TEMP1[] = TR_TEMP1;
const prog_char APM STR_TEMP2[] = TR_TEMP2;
const prog_char APM STR_RPM[] = TR_RPM;
const prog_char APM STR_FUEL[] = TR_FUEL;
const prog_char APM STR_VOLTS[] = TR_VOLTS;
const prog_char APM STR_ACCEL[] = TR_ACCEL;
const prog_char APM STR_TELE[] = TR_TELE;
const prog_char APM STR_RSSI[] = TR_RSSI;
const prog_char APM STR_NODATA[] = TR_NODATA;
const prog_char APM STR_TM1[] = TR_TM1;
const prog_char APM STR_TM2[] = TR_TM2;
const prog_char APM STR_THR[] = TR_THR;
const prog_char APM STR_TH[] = TR_TH;
const prog_char APM STR_TOT[] = TR_TOT;
const prog_char APM STR_TMR1LATMAXUS[] = TR_TMR1LATMAXUS;
const prog_char APM STR_TMR1LATMINUS[] = TR_TMR1LATMINUS;
const prog_char APM STR_TMR1JITTERUS[] = TR_TMR1JITTERUS;
const prog_char APM STR_TMAINMAXMS[] = TR_TMAINMAXMS;
const pm_char STR_MODE[] PROGMEM = TR_MODE;
const pm_char STR_NOFREEEXPO[] PROGMEM = TR_NOFREEEXPO;
const pm_char STR_NOFREEMIXER[] PROGMEM = TR_NOFREEMIXER;
const pm_char STR_INSERTMIX[] PROGMEM = TR_INSERTMIX;
const pm_char STR_EDITMIX[] PROGMEM = TR_EDITMIX;
const pm_char STR_SOURCE[] PROGMEM = TR_SOURCE;
const pm_char STR_WEIGHT[] PROGMEM = TR_WEIGHT;
const pm_char STR_OFFSET[] PROGMEM = TR_OFFSET;
const pm_char STR_TRIM[] PROGMEM = TR_TRIM;
const pm_char STR_CURVES[] PROGMEM = TR_CURVES;
const pm_char STR_FPHASE[] PROGMEM = TR_FPHASE;
const pm_char STR_WARNING[] PROGMEM = TR_WARNING;
const pm_char STR_OFF[] PROGMEM = TR_OFF;
const pm_char STR_MULTPX[] PROGMEM = TR_MULTPX;
const pm_char STR_DELAYDOWN[] PROGMEM = TR_DELAYDOWN;
const pm_char STR_DELAYUP[] PROGMEM = TR_DELAYUP;
const pm_char STR_SLOWDOWN[] PROGMEM = TR_SLOWDOWN;
const pm_char STR_SLOWUP[] PROGMEM = TR_SLOWUP;
const pm_char STR_DREXPO[] PROGMEM = TR_DREXPO;
const pm_char STR_MIXER[] PROGMEM = TR_MIXER;
const pm_char STR_COPYTRIMMENU[] PROGMEM = TR_COPYTRIMMENU;
const pm_char STR_CV[] PROGMEM = TR_CV;
const pm_char STR_SW[] PROGMEM = TR_SW;
const pm_char STR_ACHANNEL[] PROGMEM = TR_ACHANNEL;
const pm_char STR_MAX[] PROGMEM = TR_MAX;
const pm_char STR_CALIB[] PROGMEM = TR_CALIB;
const pm_char STR_BAR[] PROGMEM = TR_BAR;
const pm_char STR_ALARM[] PROGMEM = TR_ALARM;
const pm_char STR_USRPROTO[] PROGMEM = TR_USRPROTO;
const pm_char STR_CLEARMIXMENU[] PROGMEM = TR_CLEARMIXMENU;
const pm_char STR_BEEPER[] PROGMEM = TR_BEEPER;
const pm_char STR_CONTRAST[] PROGMEM = TR_CONTRAST;
const pm_char STR_BATTERYWARNING[] PROGMEM = TR_BATTERYWARNING;
const pm_char STR_INACTIVITYALARM[] PROGMEM = TR_INACTIVITYALARM;
const pm_char STR_FILTERADC[] PROGMEM = TR_FILTERADC;
const pm_char STR_THROTTLEREVERSE[] PROGMEM = TR_THROTTLEREVERSE;
const pm_char STR_MINUTEBEEP[] PROGMEM = TR_MINUTEBEEP;
const pm_char STR_BEEPCOUNTDOWN[] PROGMEM = TR_BEEPCOUNTDOWN;
const pm_char STR_FLASHONBEEP[] PROGMEM = TR_FLASHONBEEP;
const pm_char STR_LIGHTSWITCH[] PROGMEM = TR_LIGHTSWITCH;
const pm_char STR_LIGHTOFFAFTER[] PROGMEM = TR_LIGHTOFFAFTER;
const pm_char STR_SPLASHSCREEN[] PROGMEM = TR_SPLASHSCREEN;
const pm_char STR_THROTTLEWARNING[] PROGMEM = TR_THROTTLEWARNING;
const pm_char STR_SWITCHWARNING[] PROGMEM = TR_SWITCHWARNING;
const pm_char STR_MEMORYWARNING[] PROGMEM = TR_MEMORYWARNING;
const pm_char STR_ALARMWARNING[] PROGMEM = TR_ALARMWARNING;
const pm_char STR_NODATAALARM[] PROGMEM = TR_NODATAALARM;
const pm_char STR_RXCHANNELORD[] PROGMEM = TR_RXCHANNELORD;
const pm_char STR_MODE2[] PROGMEM = TR_MODE2;
const pm_char STR_SLAVE[] PROGMEM = TR_SLAVE;
const pm_char STR_MODESRC[] PROGMEM = TR_MODESRC;
const pm_char STR_MULTIPLIER[] PROGMEM = TR_MULTIPLIER;
const pm_char STR_CAL[] PROGMEM = TR_CAL;
const pm_char STR_EEPROMV[] PROGMEM = TR_EEPROMV;
const pm_char STR_VTRIM[] PROGMEM = TR_VTRIM;
const pm_char STR_BG[] PROGMEM = TR_BG;
const pm_char STR_MENUTOSTART[] PROGMEM = TR_MENUTOSTART;
const pm_char STR_SETMIDPOINT[] PROGMEM = TR_SETMIDPOINT;
const pm_char STR_MOVESTICKSPOTS[] PROGMEM = TR_MOVESTICKSPOTS;
const pm_char STR_ALT[] PROGMEM = TR_ALT;
const pm_char STR_RXBATT[] PROGMEM = TR_RXBATT;
const pm_char STR_RX[] PROGMEM = TR_RX;
const pm_char STR_TX[] PROGMEM = TR_TX;
const pm_char STR_HDG[] PROGMEM = TR_HDG;
const pm_char STR_SPD[] PROGMEM = TR_SPD;
const pm_char STR_TEMP1[] PROGMEM = TR_TEMP1;
const pm_char STR_TEMP2[] PROGMEM = TR_TEMP2;
const pm_char STR_RPM[] PROGMEM = TR_RPM;
const pm_char STR_FUEL[] PROGMEM = TR_FUEL;
const pm_char STR_VOLTS[] PROGMEM = TR_VOLTS;
const pm_char STR_ACCEL[] PROGMEM = TR_ACCEL;
const pm_char STR_TELE[] PROGMEM = TR_TELE;
const pm_char STR_RSSI[] PROGMEM = TR_RSSI;
const pm_char STR_NODATA[] PROGMEM = TR_NODATA;
const pm_char STR_TM1[] PROGMEM = TR_TM1;
const pm_char STR_TM2[] PROGMEM = TR_TM2;
const pm_char STR_THR[] PROGMEM = TR_THR;
const pm_char STR_TH[] PROGMEM = TR_TH;
const pm_char STR_TOT[] PROGMEM = TR_TOT;
const pm_char STR_TMR1LATMAXUS[] PROGMEM = TR_TMR1LATMAXUS;
const pm_char STR_TMR1LATMINUS[] PROGMEM = TR_TMR1LATMINUS;
const pm_char STR_TMR1JITTERUS[] PROGMEM = TR_TMR1JITTERUS;
const pm_char STR_TMAINMAXMS[] PROGMEM = TR_TMAINMAXMS;
#ifdef DEBUG
const prog_char APM STR_T10MSUS[] = TR_T10MSUS;
const pm_char STR_T10MSUS[] PROGMEM = TR_T10MSUS;
#endif
const prog_char APM STR_FREESTACKMINB[] = TR_FREESTACKMINB;
const prog_char APM STR_MENUTORESET[] = TR_MENUTORESET;
const prog_char APM STR_PPM[] = TR_PPM;
const prog_char APM STR_CH[] = TR_CH;
const prog_char APM STR_TMR[] = TR_TMR;
const prog_char APM STR_MODEL[] = TR_MODEL;
const prog_char APM STR_FP[] = TR_FP;
const prog_char APM STR_EEPROMLOWMEM[] = TR_EEPROMLOWMEM;
const prog_char APM STR_ALERT[] = TR_ALERT;
const prog_char APM STR_PRESSANYKEYTOSKIP[] = TR_PRESSANYKEYTOSKIP;
const prog_char APM STR_THROTTLENOTIDLE[] = TR_THROTTLENOTIDLE;
const prog_char APM STR_RESETTHROTTLE[] = TR_RESETTHROTTLE;
const prog_char APM STR_ALARMSDISABLED[] = TR_ALARMSDISABLED;
const prog_char APM STR_SWITCHESNOTOFF[] = TR_SWITCHESNOTOFF;
const prog_char APM STR_PLEASERESETTHEM[] = TR_PLEASERESETTHEM;
const prog_char APM STR_MESSAGE[] = TR_MESSAGE;
const prog_char APM STR_PRESSANYKEY[] = TR_PRESSANYKEY;
const prog_char APM STR_BADEEPROMDATA[] = TR_BADEEPROMDATA;
const prog_char APM STR_EEPROMFORMATTING[] = TR_EEPROMFORMATTING;
const prog_char APM STR_EEPROMOVERFLOW[] = TR_EEPROMOVERFLOW;
const prog_char APM STR_MENUSERROR[] = TR_MENUSERROR;
const pm_char STR_FREESTACKMINB[] PROGMEM = TR_FREESTACKMINB;
const pm_char STR_MENUTORESET[] PROGMEM = TR_MENUTORESET;
const pm_char STR_PPM[] PROGMEM = TR_PPM;
const pm_char STR_CH[] PROGMEM = TR_CH;
const pm_char STR_TMR[] PROGMEM = TR_TMR;
const pm_char STR_MODEL[] PROGMEM = TR_MODEL;
const pm_char STR_FP[] PROGMEM = TR_FP;
const pm_char STR_EEPROMLOWMEM[] PROGMEM = TR_EEPROMLOWMEM;
const pm_char STR_ALERT[] PROGMEM = TR_ALERT;
const pm_char STR_PRESSANYKEYTOSKIP[] PROGMEM = TR_PRESSANYKEYTOSKIP;
const pm_char STR_THROTTLENOTIDLE[] PROGMEM = TR_THROTTLENOTIDLE;
const pm_char STR_RESETTHROTTLE[] PROGMEM = TR_RESETTHROTTLE;
const pm_char STR_ALARMSDISABLED[] PROGMEM = TR_ALARMSDISABLED;
const pm_char STR_SWITCHESNOTOFF[] PROGMEM = TR_SWITCHESNOTOFF;
const pm_char STR_PLEASERESETTHEM[] PROGMEM = TR_PLEASERESETTHEM;
const pm_char STR_MESSAGE[] PROGMEM = TR_MESSAGE;
const pm_char STR_PRESSANYKEY[] PROGMEM = TR_PRESSANYKEY;
const pm_char STR_BADEEPROMDATA[] PROGMEM = TR_BADEEPROMDATA;
const pm_char STR_EEPROMFORMATTING[] PROGMEM = TR_EEPROMFORMATTING;
const pm_char STR_EEPROMOVERFLOW[] PROGMEM = TR_EEPROMOVERFLOW;
const pm_char STR_MENUSERROR[] PROGMEM = TR_MENUSERROR;
const prog_char APM STR_MENURADIOSETUP[] = TR_MENURADIOSETUP;
const pm_char STR_MENURADIOSETUP[] PROGMEM = TR_MENURADIOSETUP;
#ifdef PCBV4
const prog_char APM STR_MENUDATEANDTIME[] = TR_MENUDATEANDTIME;
const pm_char STR_MENUDATEANDTIME[] PROGMEM = TR_MENUDATEANDTIME;
#endif
const prog_char APM STR_MENUTRAINER[] = TR_MENUTRAINER;
const prog_char APM STR_MENUVERSION[] = TR_MENUVERSION;
const prog_char APM STR_MENUDIAG[] = TR_MENUDIAG;
const prog_char APM STR_MENUANA[] = TR_MENUANA;
const prog_char APM STR_MENUCALIBRATION[] = TR_MENUCALIBRATION;
const pm_char STR_MENUTRAINER[] PROGMEM = TR_MENUTRAINER;
const pm_char STR_MENUVERSION[] PROGMEM = TR_MENUVERSION;
const pm_char STR_MENUDIAG[] PROGMEM = TR_MENUDIAG;
const pm_char STR_MENUANA[] PROGMEM = TR_MENUANA;
const pm_char STR_MENUCALIBRATION[] PROGMEM = TR_MENUCALIBRATION;
const prog_char APM STR_MENUMODELSEL[] = TR_MENUMODELSEL;
const prog_char APM STR_MENUSETUP[] = TR_MENUSETUP;
const prog_char APM STR_MENUFLIGHTPHASE[] = TR_MENUFLIGHTPHASE;
const prog_char APM STR_MENUFLIGHTPHASES[] = TR_MENUFLIGHTPHASES;
const pm_char STR_MENUMODELSEL[] PROGMEM = TR_MENUMODELSEL;
const pm_char STR_MENUSETUP[] PROGMEM = TR_MENUSETUP;
const pm_char STR_MENUFLIGHTPHASE[] PROGMEM = TR_MENUFLIGHTPHASE;
const pm_char STR_MENUFLIGHTPHASES[] PROGMEM = TR_MENUFLIGHTPHASES;
#ifdef HELI
const prog_char APM STR_MENUHELISETUP[] = TR_MENUHELISETUP;
const pm_char STR_MENUHELISETUP[] PROGMEM = TR_MENUHELISETUP;
#endif
const prog_char APM STR_MENUDREXPO[] = TR_MENUDREXPO;
const prog_char APM STR_MENULIMITS[] = TR_MENULIMITS;
const prog_char APM STR_MENUCURVES[] = TR_MENUCURVES;
const prog_char APM STR_MENUCURVE[] = TR_MENUCURVE;
const prog_char APM STR_MENUCUSTOMSWITCHES[] = TR_MENUCUSTOMSWITCHES;
const prog_char APM STR_MENUFUNCSWITCHES[] = TR_MENUFUNCSWITCHES;
const prog_char APM STR_MENUSAFETYSWITCHES[] = TR_MENUSAFETYSWITCHES;
const pm_char STR_MENUDREXPO[] PROGMEM = TR_MENUDREXPO;
const pm_char STR_MENULIMITS[] PROGMEM = TR_MENULIMITS;
const pm_char STR_MENUCURVES[] PROGMEM = TR_MENUCURVES;
const pm_char STR_MENUCURVE[] PROGMEM = TR_MENUCURVE;
const pm_char STR_MENUCUSTOMSWITCHES[] PROGMEM = TR_MENUCUSTOMSWITCHES;
const pm_char STR_MENUFUNCSWITCHES[] PROGMEM = TR_MENUFUNCSWITCHES;
const pm_char STR_MENUSAFETYSWITCHES[] PROGMEM = TR_MENUSAFETYSWITCHES;
#ifdef FRSKY
const prog_char APM STR_MENUTELEMETRY[] = TR_MENUTELEMETRY;
const pm_char STR_MENUTELEMETRY[] PROGMEM = TR_MENUTELEMETRY;
#endif
#ifdef TEMPLATES
const prog_char APM STR_MENUTEMPLATES[] = TR_MENUTEMPLATES;
const pm_char STR_MENUTEMPLATES[] PROGMEM = TR_MENUTEMPLATES;
#endif
const prog_char APM STR_MENUSTAT[] = TR_MENUSTAT;
const prog_char APM STR_MENUDEBUG[] = TR_MENUDEBUG;
const pm_char STR_MENUSTAT[] PROGMEM = TR_MENUSTAT;
const pm_char STR_MENUDEBUG[] PROGMEM = TR_MENUDEBUG;
#if defined(DSM2) || defined(PXX)
const prog_char APM STR_RXNUM[] = TR_RXNUM;
const pm_char STR_RXNUM[] PROGMEM = TR_RXNUM;
#endif
#if defined(PXX)
const prog_char APM STR_SYNCMENU[] = TR_SYNCMENU;
const pm_char STR_SYNCMENU[] PROGMEM = TR_SYNCMENU;
#endif
#if defined(HAPTIC)
const prog_char APM STR_HAPTICSTRENGTH[] = TR_HAPTICSTRENGTH;
const pm_char STR_HAPTICSTRENGTH[] PROGMEM = TR_HAPTICSTRENGTH;
#endif
#if defined(AUDIO)
const prog_char APM STR_SPKRPITCH[] = TR_SPKRPITCH;
const pm_char STR_SPKRPITCH[] PROGMEM = TR_SPKRPITCH;
#endif

View file

@ -13,7 +13,7 @@
// The non-0-terminated-strings
extern const PROGMEM char STR_OPEN9X[];
extern const pm_char STR_OPEN9X[];
#define OFS_OFFON 0
#define OFS_MMMINV (OFS_OFFON + PSIZE(TR_OFFON))
@ -128,169 +128,169 @@ extern const PROGMEM char STR_OPEN9X[];
// The 0-terminated-strings
extern const PROGMEM char STR_POPUPS[];
extern const PROGMEM char STR_MENUWHENDONE[];
extern const PROGMEM char STR_FREE[];
extern const pm_char STR_POPUPS[];
extern const pm_char STR_MENUWHENDONE[];
extern const pm_char STR_FREE[];
#define LEN_FREE PSIZE(TR_FREE)
extern const PROGMEM char STR_DELETEMODEL[];
extern const PROGMEM char STR_COPYINGMODEL[];
extern const PROGMEM char STR_MOVINGMODEL[];
extern const PROGMEM char STR_LOADINGMODEL[];
extern const PROGMEM char STR_NAME[];
extern const PROGMEM char STR_TIMER[];
extern const PROGMEM char STR_ELIMITS[];
extern const PROGMEM char STR_ETRIMS[];
extern const PROGMEM char STR_TRIMINC[];
extern const PROGMEM char STR_TTRACE[];
extern const PROGMEM char STR_TTRIM[];
extern const PROGMEM char STR_BEEPCTR[];
extern const PROGMEM char STR_PROTO[];
extern const PROGMEM char STR_PPMFRAME[];
extern const PROGMEM char STR_MS[];
extern const PROGMEM char STR_SWITCH[];
extern const PROGMEM char STR_TRIMS[];
extern const PROGMEM char STR_FADEIN[];
extern const PROGMEM char STR_FADEOUT[];
extern const PROGMEM char STR_DEFAULT[];
extern const PROGMEM char STR_CHECKTRIMS[];
extern const PROGMEM char STR_SWASHTYPE[];
extern const PROGMEM char STR_COLLECTIVE[];
extern const PROGMEM char STR_SWASHRING[];
extern const PROGMEM char STR_ELEDIRECTION[];
extern const PROGMEM char STR_AILDIRECTION[];
extern const PROGMEM char STR_COLDIRECTION[];
extern const PROGMEM char STR_MODE[];
extern const PROGMEM char STR_NOFREEEXPO[];
extern const PROGMEM char STR_NOFREEMIXER[];
extern const PROGMEM char STR_INSERTMIX[];
extern const PROGMEM char STR_EDITMIX[];
extern const PROGMEM char STR_SOURCE[];
extern const PROGMEM char STR_WEIGHT[];
extern const PROGMEM char STR_OFFSET[];
extern const PROGMEM char STR_TRIM[];
extern const PROGMEM char STR_CURVES[];
extern const PROGMEM char STR_FPHASE[];
extern const PROGMEM char STR_WARNING[];
extern const PROGMEM char STR_OFF[];
extern const PROGMEM char STR_MULTPX[];
extern const PROGMEM char STR_DELAYDOWN[];
extern const PROGMEM char STR_DELAYUP[];
extern const PROGMEM char STR_SLOWDOWN[];
extern const PROGMEM char STR_SLOWUP[];
extern const PROGMEM char STR_DREXPO[];
extern const PROGMEM char STR_MIXER[];
extern const PROGMEM char STR_COPYTRIMMENU[];
extern const PROGMEM char STR_CV[];
extern const PROGMEM char STR_SW[];
extern const PROGMEM char STR_ACHANNEL[];
extern const PROGMEM char STR_MAX[];
extern const PROGMEM char STR_CALIB[];
extern const PROGMEM char STR_BAR[];
extern const PROGMEM char STR_ALARM[];
extern const PROGMEM char STR_USRPROTO[];
extern const PROGMEM char STR_CLEARMIXMENU[];
extern const PROGMEM char STR_BEEPER[];
extern const PROGMEM char STR_CONTRAST[];
extern const PROGMEM char STR_BATTERYWARNING[];
extern const PROGMEM char STR_INACTIVITYALARM[];
extern const PROGMEM char STR_FILTERADC[];
extern const PROGMEM char STR_THROTTLEREVERSE[];
extern const PROGMEM char STR_MINUTEBEEP[];
extern const PROGMEM char STR_BEEPCOUNTDOWN[];
extern const PROGMEM char STR_FLASHONBEEP[];
extern const PROGMEM char STR_LIGHTSWITCH[];
extern const PROGMEM char STR_LIGHTOFFAFTER[];
extern const PROGMEM char STR_SPLASHSCREEN[];
extern const PROGMEM char STR_THROTTLEWARNING[];
extern const PROGMEM char STR_SWITCHWARNING[];
extern const PROGMEM char STR_MEMORYWARNING[];
extern const PROGMEM char STR_ALARMWARNING[];
extern const PROGMEM char STR_NODATAALARM[];
extern const PROGMEM char STR_RXCHANNELORD[];
extern const PROGMEM char STR_MODE2[];
extern const PROGMEM char STR_SLAVE[];
extern const PROGMEM char STR_MODESRC[];
extern const PROGMEM char STR_MULTIPLIER[];
extern const PROGMEM char STR_CAL[];
extern const PROGMEM char STR_EEPROMV[];
extern const PROGMEM char STR_VTRIM[];
extern const PROGMEM char STR_BG[];
extern const PROGMEM char STR_MENUTOSTART[];
extern const PROGMEM char STR_SETMIDPOINT[];
extern const PROGMEM char STR_MOVESTICKSPOTS[];
extern const PROGMEM char STR_ALT[];
extern const PROGMEM char STR_RXBATT[];
extern const PROGMEM char STR_RX[];
extern const PROGMEM char STR_TX[];
extern const PROGMEM char STR_HDG[];
extern const PROGMEM char STR_SPD[];
extern const PROGMEM char STR_TEMP1[];
extern const PROGMEM char STR_TEMP2[];
extern const PROGMEM char STR_RPM[];
extern const PROGMEM char STR_FUEL[];
extern const PROGMEM char STR_VOLTS[];
extern const PROGMEM char STR_ACCEL[];
extern const PROGMEM char STR_TELE[];
extern const PROGMEM char STR_RSSI[];
extern const PROGMEM char STR_NODATA[];
extern const PROGMEM char STR_TM1[];
extern const PROGMEM char STR_TM2[];
extern const PROGMEM char STR_THR[];
extern const PROGMEM char STR_TH[];
extern const PROGMEM char STR_TOT[];
extern const PROGMEM char STR_TMR1LATMAXUS[];
extern const PROGMEM char STR_TMR1LATMINUS[];
extern const PROGMEM char STR_TMR1JITTERUS[];
extern const PROGMEM char STR_TMAINMAXMS[];
extern const PROGMEM char STR_T10MSUS[];
extern const PROGMEM char STR_FREESTACKMINB[];
extern const PROGMEM char STR_MENUTORESET[];
extern const PROGMEM char STR_PPM[];
extern const PROGMEM char STR_CH[];
extern const PROGMEM char STR_TMR[];
extern const PROGMEM char STR_MODEL[];
extern const PROGMEM char STR_FP[];
extern const PROGMEM char STR_EEPROMLOWMEM[];
extern const PROGMEM char STR_ALERT[];
extern const PROGMEM char STR_PRESSANYKEYTOSKIP[];
extern const PROGMEM char STR_THROTTLENOTIDLE[];
extern const PROGMEM char STR_RESETTHROTTLE[];
extern const PROGMEM char STR_ALARMSDISABLED[];
extern const PROGMEM char STR_SWITCHESNOTOFF[];
extern const PROGMEM char STR_PLEASERESETTHEM[];
extern const PROGMEM char STR_MESSAGE[];
extern const PROGMEM char STR_PRESSANYKEY[];
extern const pm_char STR_DELETEMODEL[];
extern const pm_char STR_COPYINGMODEL[];
extern const pm_char STR_MOVINGMODEL[];
extern const pm_char STR_LOADINGMODEL[];
extern const pm_char STR_NAME[];
extern const pm_char STR_TIMER[];
extern const pm_char STR_ELIMITS[];
extern const pm_char STR_ETRIMS[];
extern const pm_char STR_TRIMINC[];
extern const pm_char STR_TTRACE[];
extern const pm_char STR_TTRIM[];
extern const pm_char STR_BEEPCTR[];
extern const pm_char STR_PROTO[];
extern const pm_char STR_PPMFRAME[];
extern const pm_char STR_MS[];
extern const pm_char STR_SWITCH[];
extern const pm_char STR_TRIMS[];
extern const pm_char STR_FADEIN[];
extern const pm_char STR_FADEOUT[];
extern const pm_char STR_DEFAULT[];
extern const pm_char STR_CHECKTRIMS[];
extern const pm_char STR_SWASHTYPE[];
extern const pm_char STR_COLLECTIVE[];
extern const pm_char STR_SWASHRING[];
extern const pm_char STR_ELEDIRECTION[];
extern const pm_char STR_AILDIRECTION[];
extern const pm_char STR_COLDIRECTION[];
extern const pm_char STR_MODE[];
extern const pm_char STR_NOFREEEXPO[];
extern const pm_char STR_NOFREEMIXER[];
extern const pm_char STR_INSERTMIX[];
extern const pm_char STR_EDITMIX[];
extern const pm_char STR_SOURCE[];
extern const pm_char STR_WEIGHT[];
extern const pm_char STR_OFFSET[];
extern const pm_char STR_TRIM[];
extern const pm_char STR_CURVES[];
extern const pm_char STR_FPHASE[];
extern const pm_char STR_WARNING[];
extern const pm_char STR_OFF[];
extern const pm_char STR_MULTPX[];
extern const pm_char STR_DELAYDOWN[];
extern const pm_char STR_DELAYUP[];
extern const pm_char STR_SLOWDOWN[];
extern const pm_char STR_SLOWUP[];
extern const pm_char STR_DREXPO[];
extern const pm_char STR_MIXER[];
extern const pm_char STR_COPYTRIMMENU[];
extern const pm_char STR_CV[];
extern const pm_char STR_SW[];
extern const pm_char STR_ACHANNEL[];
extern const pm_char STR_MAX[];
extern const pm_char STR_CALIB[];
extern const pm_char STR_BAR[];
extern const pm_char STR_ALARM[];
extern const pm_char STR_USRPROTO[];
extern const pm_char STR_CLEARMIXMENU[];
extern const pm_char STR_BEEPER[];
extern const pm_char STR_CONTRAST[];
extern const pm_char STR_BATTERYWARNING[];
extern const pm_char STR_INACTIVITYALARM[];
extern const pm_char STR_FILTERADC[];
extern const pm_char STR_THROTTLEREVERSE[];
extern const pm_char STR_MINUTEBEEP[];
extern const pm_char STR_BEEPCOUNTDOWN[];
extern const pm_char STR_FLASHONBEEP[];
extern const pm_char STR_LIGHTSWITCH[];
extern const pm_char STR_LIGHTOFFAFTER[];
extern const pm_char STR_SPLASHSCREEN[];
extern const pm_char STR_THROTTLEWARNING[];
extern const pm_char STR_SWITCHWARNING[];
extern const pm_char STR_MEMORYWARNING[];
extern const pm_char STR_ALARMWARNING[];
extern const pm_char STR_NODATAALARM[];
extern const pm_char STR_RXCHANNELORD[];
extern const pm_char STR_MODE2[];
extern const pm_char STR_SLAVE[];
extern const pm_char STR_MODESRC[];
extern const pm_char STR_MULTIPLIER[];
extern const pm_char STR_CAL[];
extern const pm_char STR_EEPROMV[];
extern const pm_char STR_VTRIM[];
extern const pm_char STR_BG[];
extern const pm_char STR_MENUTOSTART[];
extern const pm_char STR_SETMIDPOINT[];
extern const pm_char STR_MOVESTICKSPOTS[];
extern const pm_char STR_ALT[];
extern const pm_char STR_RXBATT[];
extern const pm_char STR_RX[];
extern const pm_char STR_TX[];
extern const pm_char STR_HDG[];
extern const pm_char STR_SPD[];
extern const pm_char STR_TEMP1[];
extern const pm_char STR_TEMP2[];
extern const pm_char STR_RPM[];
extern const pm_char STR_FUEL[];
extern const pm_char STR_VOLTS[];
extern const pm_char STR_ACCEL[];
extern const pm_char STR_TELE[];
extern const pm_char STR_RSSI[];
extern const pm_char STR_NODATA[];
extern const pm_char STR_TM1[];
extern const pm_char STR_TM2[];
extern const pm_char STR_THR[];
extern const pm_char STR_TH[];
extern const pm_char STR_TOT[];
extern const pm_char STR_TMR1LATMAXUS[];
extern const pm_char STR_TMR1LATMINUS[];
extern const pm_char STR_TMR1JITTERUS[];
extern const pm_char STR_TMAINMAXMS[];
extern const pm_char STR_T10MSUS[];
extern const pm_char STR_FREESTACKMINB[];
extern const pm_char STR_MENUTORESET[];
extern const pm_char STR_PPM[];
extern const pm_char STR_CH[];
extern const pm_char STR_TMR[];
extern const pm_char STR_MODEL[];
extern const pm_char STR_FP[];
extern const pm_char STR_EEPROMLOWMEM[];
extern const pm_char STR_ALERT[];
extern const pm_char STR_PRESSANYKEYTOSKIP[];
extern const pm_char STR_THROTTLENOTIDLE[];
extern const pm_char STR_RESETTHROTTLE[];
extern const pm_char STR_ALARMSDISABLED[];
extern const pm_char STR_SWITCHESNOTOFF[];
extern const pm_char STR_PLEASERESETTHEM[];
extern const pm_char STR_MESSAGE[];
extern const pm_char STR_PRESSANYKEY[];
#define LEN_PRESSANYKEY PSIZE(TR_PRESSANYKEY)
extern const PROGMEM char STR_BADEEPROMDATA[];
extern const PROGMEM char STR_EEPROMFORMATTING[];
extern const PROGMEM char STR_EEPROMOVERFLOW[];
extern const PROGMEM char STR_MENUSERROR[];
extern const PROGMEM char STR_MENURADIOSETUP[];
extern const PROGMEM char STR_MENUDATEANDTIME[];
extern const PROGMEM char STR_MENUTRAINER[];
extern const PROGMEM char STR_MENUVERSION[];
extern const PROGMEM char STR_MENUDIAG[];
extern const PROGMEM char STR_MENUANA[];
extern const PROGMEM char STR_MENUCALIBRATION[];
extern const PROGMEM char STR_MENUMODELSEL[];
extern const PROGMEM char STR_MENUSETUP[];
extern const PROGMEM char STR_MENUFLIGHTPHASE[];
extern const PROGMEM char STR_MENUFLIGHTPHASES[];
extern const PROGMEM char STR_MENUHELISETUP[];
extern const PROGMEM char STR_MENUDREXPO[];
extern const PROGMEM char STR_MENULIMITS[];
extern const PROGMEM char STR_MENUCURVES[];
extern const PROGMEM char STR_MENUCURVE[];
extern const PROGMEM char STR_MENUCUSTOMSWITCHES[];
extern const PROGMEM char STR_MENUFUNCSWITCHES[];
extern const PROGMEM char STR_MENUSAFETYSWITCHES[];
extern const PROGMEM char STR_MENUTELEMETRY[];
extern const PROGMEM char STR_MENUTEMPLATES[];
extern const PROGMEM char STR_MENUSTAT[];
extern const PROGMEM char STR_MENUDEBUG[];
extern const PROGMEM char STR_RXNUM[];
extern const PROGMEM char STR_SYNCMENU[];
extern const PROGMEM char STR_HAPTICSTRENGTH[];
extern const PROGMEM char STR_SPKRPITCH[];
extern const pm_char STR_BADEEPROMDATA[];
extern const pm_char STR_EEPROMFORMATTING[];
extern const pm_char STR_EEPROMOVERFLOW[];
extern const pm_char STR_MENUSERROR[];
extern const pm_char STR_MENURADIOSETUP[];
extern const pm_char STR_MENUDATEANDTIME[];
extern const pm_char STR_MENUTRAINER[];
extern const pm_char STR_MENUVERSION[];
extern const pm_char STR_MENUDIAG[];
extern const pm_char STR_MENUANA[];
extern const pm_char STR_MENUCALIBRATION[];
extern const pm_char STR_MENUMODELSEL[];
extern const pm_char STR_MENUSETUP[];
extern const pm_char STR_MENUFLIGHTPHASE[];
extern const pm_char STR_MENUFLIGHTPHASES[];
extern const pm_char STR_MENUHELISETUP[];
extern const pm_char STR_MENUDREXPO[];
extern const pm_char STR_MENULIMITS[];
extern const pm_char STR_MENUCURVES[];
extern const pm_char STR_MENUCURVE[];
extern const pm_char STR_MENUCUSTOMSWITCHES[];
extern const pm_char STR_MENUFUNCSWITCHES[];
extern const pm_char STR_MENUSAFETYSWITCHES[];
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_RXNUM[];
extern const pm_char STR_SYNCMENU[];
extern const pm_char STR_HAPTICSTRENGTH[];
extern const pm_char STR_SPKRPITCH[];
#endif

View file

@ -22,9 +22,9 @@
#include "open9x.h"
#ifdef SPLASH
prog_uchar APM spsMarker[] = { "SPS" };
const pm_uchar spsMarker[] PROGMEM = { "SPS" };
#include "s9xsplash.lbm"
prog_uchar APM speMarker[] = { "SPE" };
const pm_uchar speMarker[] PROGMEM = { "SPE" };
#endif
#include "menus.h"
@ -51,13 +51,13 @@ audioQueue audio;
uint8_t heartbeat;
const prog_char APM s_charTab[] = "_-.,";
const pm_char s_charTab[] PROGMEM = "_-.,";
//R=1
//E=2
//T=3
//A=4
const prog_uint8_t APM chout_ar[] = { //First number is 0..23 -> template setup, Second is relevant channel out
const pm_uint8_t chout_ar[] PROGMEM = { //First number is 0..23 -> template setup, Second is relevant channel out
1,2,3,4 , 1,2,4,3 , 1,3,2,4 , 1,3,4,2 , 1,4,2,3 , 1,4,3,2,
2,1,3,4 , 2,1,4,3 , 2,3,1,4 , 2,3,4,1 , 2,4,1,3 , 2,4,3,1,
3,1,2,4 , 3,1,4,2 , 3,2,1,4 , 3,2,4,1 , 3,4,1,2 , 3,4,2,1,
@ -69,7 +69,7 @@ mode2 rud thr ele ail
mode3 ail ele thr rud
mode4 ail thr ele rud
*/
const prog_uint8_t APM modn12x3[]= {
const pm_uint8_t modn12x3[] PROGMEM = {
1, 2, 3, 4,
1, 3, 2, 4,
4, 2, 3, 1,
@ -552,7 +552,7 @@ void checkLowEEPROM()
}
}
void alertMessages( const prog_char * s, const prog_char * t )
void alertMessages( const pm_char * s, const pm_char * t )
{
lcd_clear();
lcd_putsAtt(64-5*FW,0*FH,STR_ALERT,DBLSIZE);
@ -643,7 +643,7 @@ void checkSwitches()
}
}
void message(const prog_char * s)
void message(const pm_char * s)
{
lcd_clear();
lcd_putsAtt(64-5*FW, 0*FH, STR_MESSAGE, DBLSIZE);
@ -652,7 +652,7 @@ void message(const prog_char * s)
lcdSetRefVolt(g_eeGeneral.contrast);
}
void alert(const prog_char * s, bool defaults)
void alert(const pm_char * s, bool defaults)
{
lcd_clear();
lcd_putsAtt(64-5*FW, 0*FH, STR_ALERT, DBLSIZE);
@ -766,9 +766,9 @@ static uint16_t s_anaFilt[8];
uint16_t anaIn(uint8_t chan)
{
// ana-in: 3 1 2 0 4 5 6 7
//static prog_char APM crossAna[]={4,2,3,1,5,6,7,0}; // wenn schon Tabelle, dann muss sich auch lohnen
//static pm_char crossAna[] PROGMEM ={4,2,3,1,5,6,7,0}; // wenn schon Tabelle, dann muss sich auch lohnen
// Google Translate (German): // if table already, then it must also be worthwhile
static prog_char APM crossAna[]={3,1,2,0,4,5,6,7};
static const pm_char crossAna[] PROGMEM ={3,1,2,0,4,5,6,7};
volatile uint16_t *p = &s_anaFilt[pgm_read_byte(crossAna+chan)];
return *p;
}

View file

@ -52,10 +52,13 @@
//#define __ATTR_PROGMEM__
#include <avr/pgmspace.h>
#undef PROGMEM
#define PROGMEM __attribute__(( section(".progmem.data") ))
#include "pgmtypes.h"
#ifdef __cplusplus
#define APM __attribute__(( section(".progmem.data") ))
#undef PSTR
#define PSTR(s) (__extension__({static prog_char APM __c[] = (s);&__c[0];}))
#define PSTR(s) (__extension__({static const pm_char __c[] PROGMEM = (s);&__c[0];}))
#endif
#include <avr/eeprom.h>
@ -252,8 +255,8 @@ extern uint16_t DEBUG2;
#define SLAVE_MODE (PING & (1<<INP_G_RF_POW))
extern const prog_uint8_t APM chout_ar[24*4];
extern const prog_uint8_t APM modn12x3[4*4];
extern const pm_uint8_t chout_ar[24*4];
extern const pm_uint8_t modn12x3[4*4];
//convert from mode 1 to mode g_eeGeneral.stickMode
//NOTICE! => 1..4 -> 1..4
@ -433,8 +436,8 @@ extern uint8_t keyDown();
/// Gibt Alarm Maske auf lcd aus.
/// Die Maske wird so lange angezeigt bis eine beliebige Taste gedrueckt wird.
void alert(const prog_char * s, bool defaults=false);
void message(const prog_char * s);
void alert(const pm_char * s, bool defaults=false);
void message(const pm_char * s);
/// periodisches Hauptprogramm
void perMain();
/// Bearbeitet alle zeitkritischen Jobs.

15
src/pgmtypes.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef __PGMTYPES__
#define __PGMTYPES__
typedef void pm_void;
typedef char pm_char;
typedef unsigned char pm_uchar;
typedef int8_t pm_int8_t;
typedef uint8_t pm_uint8_t;
typedef int16_t pm_int16_t;
typedef uint16_t pm_uint16_t;
typedef int32_t pm_int32_t;
typedef uint32_t pm_uint32_t;
#endif /* __PGMTYPES__ */

View file

@ -215,7 +215,7 @@ FORCEINLINE void setupPulsesPPM()
}
#if defined(PXX)
prog_uint16_t APM CRCTable[]=
pm_uint16_t CRCTable[] PROGMEM =
{
0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,
0x8c48,0x9dc1,0xaf5a,0xbed3,0xca6c,0xdbe5,0xe97e,0xf8f7,

View file

@ -1,4 +1,4 @@
prog_uchar APM s9xsplash[] = {
const pm_uchar s9xsplash[] PROGMEM = {
128,64,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,

View file

@ -74,12 +74,12 @@ void sig(int sgn)
#define APM
typedef unsigned char prog_uchar;
typedef const char prog_char;
typedef const uint16_t prog_uint16_t;
typedef const uint8_t prog_uint8_t;
typedef const int16_t prog_int16_t;
typedef const int8_t prog_int8_t;
typedef unsigned char pm_uchar;
typedef const char pm_char;
typedef const uint16_t pm_uint16_t;
typedef const uint8_t pm_uint8_t;
typedef const int16_t pm_int16_t;
typedef const int8_t pm_int8_t;
extern sem_t eeprom_write_sem;

View file

@ -4,10 +4,10 @@
#define STR2(s) #s
#define DEFNUMSTR(s) STR2(s)
const char APM stamp1[] = "VERS: V" VERS_STR;
const char APM stamp2[] = " SVN: " SVN_STR;
const char APM stamp3[] = "DATE: " DATE_STR;
const char APM stamp4[] = "TIME: " TIME_STR;
const char APM stamp5[] = " MOD: " MOD_STR;
const pm_char stamp1[] PROGMEM = "VERS: V" VERS_STR;
const pm_char stamp2[] PROGMEM = " SVN: " SVN_STR;
const pm_char stamp3[] PROGMEM = "DATE: " DATE_STR;
const pm_char stamp4[] PROGMEM = "TIME: " TIME_STR;
const pm_char stamp5[] PROGMEM = " MOD: " MOD_STR;

View file

@ -1,4 +1,4 @@
prog_uchar APM sticks[] = {
const pm_uchar sticks[] PROGMEM = {
18,8,
0x00,0x08,0x1c,0x08,0x08,0x08,0x1c,0x08,0x00,0x00,0x08,0x22,0x00,0x49,0x00,0x22,0x08,0x00,
0x00,0x00,0x00,0x00,0x22,0x7f,0x22,0x00,0x00,0x00,0x08,0x22,0x00,0x49,0x00,0x22,0x08,0x00,

View file

@ -49,14 +49,14 @@
#include "open9x.h"
#include "templates.h"
const char stn1[] APM = "Simple 4-CH";
const char stn2[] APM = "T-Cut";
const char stn3[] APM = "V-Tail";
const char stn4[] APM = "Elevon\\Delta";
const char stn5[] APM = "eCCPM";
const char stn6[] APM = "Heli Setup";
const char stn7[] APM = "Servo Test";
const prog_char* n_Templates[] =
const pm_char stn1[] PROGMEM = "Simple 4-CH";
const pm_char stn2[] PROGMEM = "T-Cut";
const pm_char stn3[] PROGMEM = "V-Tail";
const pm_char stn4[] PROGMEM = "Elevon\\Delta";
const pm_char stn5[] PROGMEM = "eCCPM";
const pm_char stn6[] PROGMEM = "Heli Setup";
const pm_char stn7[] PROGMEM = "Servo Test";
const pm_char * const n_Templates[] PROGMEM =
{
stn1,
stn2,
@ -92,7 +92,7 @@ void clearCurves()
memset(g_model.curves9,0,sizeof(g_model.curves9)); //clear all curves
}
void setCurve(uint8_t c, const prog_int8_t ar[])
void setCurve(uint8_t c, const pm_int8_t ar[])
{
if(c<MAX_CURVE5) //5 pt curve
for(uint8_t i=0; i<5; i++) g_model.curves5[c][i] = pgm_read_byte(&ar[i]);
@ -107,11 +107,11 @@ void setSwitch(uint8_t idx, uint8_t func, int8_t v1, int8_t v2)
g_model.customSw[idx-1].v2 = v2;
}
const prog_int8_t APM heli_ar1[] = {-100, 20, 50, 70, 90};
const prog_int8_t APM heli_ar2[] = {90, 70, 50, 70, 90};
const prog_int8_t APM heli_ar3[] = {-20, -20, 0, 60, 100};
const prog_int8_t APM heli_ar4[] = {-100, -60, 0, 60, 100};
const prog_int8_t APM heli_ar5[] = {-100, 0, 0, 0, 100};
const pm_int8_t heli_ar1[] PROGMEM = {-100, 20, 50, 70, 90};
const pm_int8_t heli_ar2[] PROGMEM = {90, 70, 50, 70, 90};
const pm_int8_t heli_ar3[] PROGMEM = {-20, -20, 0, 60, 100};
const pm_int8_t heli_ar4[] PROGMEM = {-100, -60, 0, 60, 100};
const pm_int8_t heli_ar5[] PROGMEM = {-100, 0, 0, 0, 100};
void applyTemplate(uint8_t idx)
{
MixData *md = &g_model.mixData[0];