90 bytes saved on the channel order array + access functions

This commit is contained in:
bsongis
2012-02-05 10:27:21 +00:00
parent 8be03cd80d
commit d3c4cb2534
4 changed files with 17 additions and 16 deletions
+4 -3
View File
@@ -255,18 +255,19 @@ extern uint16_t DEBUG2;
#define SLAVE_MODE (PING & (1<<INP_G_RF_POW))
extern const pm_uint8_t chout_ar[24*4];
extern const pm_uint8_t modn12x3[4*4];
extern const pm_uint8_t bchout_ar[];
extern const pm_uint8_t modn12x3[];
//convert from mode 1 to mode g_eeGeneral.stickMode
//NOTICE! => 1..4 -> 1..4
#define CONVERT_MODE(x) (((x)<=4) ? pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + (x)-1) : (x) )
#define CHANNEL_ORDER(x) pgm_read_byte(chout_ar + 4*g_eeGeneral.templateSetup + (x)-1)
#define THR_STICK (2-(g_eeGeneral.stickMode&1))
#define ELE_STICK (1+(g_eeGeneral.stickMode&1))
#define AIL_STICK ((g_eeGeneral.stickMode&2) ? 0 : 3)
#define RUD_STICK ((g_eeGeneral.stickMode&2) ? 3 : 0)
extern uint8_t channel_order(uint8_t x);
enum EnumKeys {
KEY_MENU ,
KEY_EXIT ,