MSVC errors

This commit is contained in:
Bertrand Songis
2016-03-05 08:59:28 +01:00
parent 15912854e8
commit 863272bc52
2 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -350,6 +350,12 @@ PACK(struct CustomFunctionData {
typedef int16_t gvar_t;
#if MAX_ROTARY_ENCODERS > 0
#define FLIGHT_MODE_ROTARY_ENCODERS_FIELD int16_t rotaryEncoders[MAX_ROTARY_ENCODERS];
#else
#define FLIGHT_MODE_ROTARY_ENCODERS_FIELD
#endif
#if defined(CPUARM)
PACK(struct FlightModeData {
trim_t trim[4];
@@ -358,7 +364,7 @@ PACK(struct FlightModeData {
int16_t spare:7;
uint8_t fadeIn;
uint8_t fadeOut;
int16_t rotaryEncoders[MAX_ROTARY_ENCODERS];
FLIGHT_MODE_ROTARY_ENCODERS_FIELD
gvar_t gvars[MAX_GVARS];
});
#elif !defined(PCBSTD)
@@ -368,7 +374,7 @@ PACK(struct FlightModeData {
NOBACKUP(char name[LEN_FLIGHT_MODE_NAME]);
uint8_t fadeIn:4;
uint8_t fadeOut:4;
int16_t rotaryEncoders[MAX_ROTARY_ENCODERS];
FLIGHT_MODE_ROTARY_ENCODERS_FIELD
gvar_t gvars[MAX_GVARS];
});
#else
+3
View File
@@ -272,7 +272,10 @@ void processSportPacket(uint8_t * packet)
else if (id >= DIY_FIRST_ID && id <= DIY_LAST_ID) {
#if defined(LUA)
if (luaInputTelemetryFifo) {
#if defined __GNUC__
// TODO remove this ifdef when we have updated to MSVC recent version
luaInputTelemetryFifo->push((LuaTelemetryValue){(uint8_t)id, data});
#endif
}
#endif
}