1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 06:15:10 +03:00

Issue #592 - Corrections for ARM boards

This commit is contained in:
Bertrand Songis 2014-02-04 07:35:46 +01:00
parent a48d76504a
commit 98eb42a77c
2 changed files with 11 additions and 7 deletions

View file

@ -4754,7 +4754,11 @@ void menuModelCustomFunctions(uint8_t event)
}
else if (func == FUNC_TRAINER) {
maxParam = 4;
#if defined(CPUARM)
putsMixerSource(MODEL_CUSTOM_FUNC_2ND_COLUMN+7*FW, y, CFN_CH_NUMBER(sd)==0 ? 0 : MIXSRC_Rud+CFN_CH_NUMBER(sd)-1, attr);
#else
putsMixerSource(MODEL_CUSTOM_FUNC_2ND_COLUMN+7*FW, y, MIXSRC_Rud+CFN_CH_NUMBER(sd)-1, attr);
#endif
}
#if defined(GVARS)
else if (func == FUNC_ADJUST_GVAR) {

View file

@ -786,23 +786,23 @@ PACK(typedef struct t_CustomFnData { // Function Switches data
char name[LEN_CFN_NAME];
struct {
int16_t val;
int16_t ext1;
int16_t ext2;
uint8_t mode;
uint8_t spare1;
int16_t spare2;
} composite;
}) param;
uint8_t mode:2;
uint8_t active:6;
uint8_t active;
}) CustomFnData;
#define CFN_EMPTY(p) (!(p)->swtch)
#define CFN_FUNC(p) ((p)->func)
#define CFN_ACTIVE(p) ((p)->active)
#define CFN_CH_NUMBER(p) (CFN_FUNC(p))
#define CFN_CH_NUMBER(p) ((p)->param.composite.mode)
#define CFN_PLAY_REPEAT(p) ((p)->active)
#define CFN_PLAY_REPEAT_MUL 1
#define CFN_PLAY_REPEAT_NOSTART 0x3F
#define CFN_GVAR_MODE(p) ((p)->mode)
#define CFN_GVAR_MODE(p) ((p)->param.composite.mode)
#define CFN_PARAM(p) ((p)->param.composite.val)
#define CFN_RESET(p) (p->active = 0, memset(&(p)->param, 0, sizeof((p)->param)))
#define CFN_RESET(p) ((p)->active=0, (p)->param.composite.val=0, (p)->param.composite.mode=0, (p)->param.composite.spare1=0, (p)->param.composite.spare2=0)
#else
PACK(typedef struct t_CustomFnData {
uint8_t value;