1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 09:15:38 +03:00

VC++ compilation

This commit is contained in:
Andre Bernet 2015-05-05 11:51:40 +04:00
parent 5751a6a06a
commit 10b54312d8

View file

@ -406,6 +406,7 @@ enum BeeperMode {
#define EXTRA_GENERAL_FIELDS
#endif
#if defined(PCBSKY9X) && defined(REVX)
PACK(typedef struct {
int8_t rfProtocol;
uint8_t channelsStart;
@ -415,13 +416,22 @@ PACK(typedef struct {
int8_t ppmDelay;
int8_t ppmFrameLength;
uint8_t ppmPulsePol:1;
#if defined(PCBSKY9X) && defined(REVX)
uint8_t ppmOutputType:1; // false = open drain, true = push pull
uint8_t spare:6;
#else
uint8_t spare:7;
#endif
}) ModuleData;
#else
PACK(typedef struct {
int8_t rfProtocol;
uint8_t channelsStart;
int8_t channelsCount; // 0=8 channels
uint8_t failsafeMode;
int16_t failsafeChannels[NUM_CHNOUT];
int8_t ppmDelay;
int8_t ppmFrameLength;
uint8_t ppmPulsePol:1;
uint8_t spare:7;
}) ModuleData;
#endif
#define SET_DEFAULT_PPM_FRAME_LENGTH(idx) g_model.moduleData[idx].ppmFrameLength = 4 * max((int8_t)0, g_model.moduleData[idx].channelsCount)