fixes
This commit is contained in:
@@ -735,9 +735,9 @@ PACK(struct TrainerData {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BUZZER)
|
#if defined(BUZZER)
|
||||||
#define BUZZER_FIELD NOBACKUP(int8_t buzzerMode:2); // -2=quiet, -1=only alarms, 0=no keys, 1=all (only used on AVR radios without audio hardware)
|
#define BUZZER_FIELD int8_t buzzerMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all (only used on AVR radios without audio hardware)
|
||||||
#else
|
#else
|
||||||
#define BUZZER_FIELD NOBACKUP(int8_t spareRadio:2);
|
#define BUZZER_FIELD int8_t spareRadio:2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PACK(struct RadioData {
|
PACK(struct RadioData {
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ PACK(typedef struct {
|
|||||||
char name[LEN_CURVE_NAME];
|
char name[LEN_CURVE_NAME];
|
||||||
}) CurveData_v218;
|
}) CurveData_v218;
|
||||||
|
|
||||||
|
PACK(typedef struct {
|
||||||
|
int16_t calib[4];
|
||||||
|
TrainerMix mix[4];
|
||||||
|
}) TrainerData_v218;
|
||||||
|
|
||||||
PACK(typedef struct { // Logical Switches data
|
PACK(typedef struct { // Logical Switches data
|
||||||
uint8_t func;
|
uint8_t func;
|
||||||
int32_t v1:10;
|
int32_t v1:10;
|
||||||
@@ -206,7 +211,7 @@ PACK(typedef struct {
|
|||||||
int8_t varioPitch; \
|
int8_t varioPitch; \
|
||||||
int8_t varioRange; \
|
int8_t varioRange; \
|
||||||
int8_t varioRepeat; \
|
int8_t varioRepeat; \
|
||||||
CustomFunctionData customFn[MAX_SPECIAL_FUNCTIONS];
|
CustomFunctionData_v218 customFn[MAX_SPECIAL_FUNCTIONS];
|
||||||
|
|
||||||
#if defined(PCBHORUS)
|
#if defined(PCBHORUS)
|
||||||
#define EXTRA_GENERAL_FIELDS_218 \
|
#define EXTRA_GENERAL_FIELDS_218 \
|
||||||
@@ -261,10 +266,18 @@ PACK(typedef struct {
|
|||||||
#define EXTRA_GENERAL_FIELDS_218
|
#define EXTRA_GENERAL_FIELDS_218
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBHORUS)
|
||||||
|
#define SPLASH_MODE uint8_t splashSpares:3
|
||||||
|
#elif defined(FSPLASH)
|
||||||
|
#define SPLASH_MODE uint8_t splashMode:3
|
||||||
|
#else
|
||||||
|
#define SPLASH_MODE int8_t splashMode:3
|
||||||
|
#endif
|
||||||
|
|
||||||
PACK(typedef struct {
|
PACK(typedef struct {
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
uint16_t variant;
|
uint16_t variant;
|
||||||
CalibData_v218 calib[NUM_STICKS+NUM_POTS+NUM_SLIDERS+NUM_MOUSE_ANALOGS+NUM_DUMMY_ANAS];
|
CalibData calib[NUM_STICKS+NUM_POTS+NUM_SLIDERS+NUM_MOUSE_ANALOGS+NUM_DUMMY_ANAS];
|
||||||
uint16_t chkSum;
|
uint16_t chkSum;
|
||||||
N_HORUS_FIELD(int8_t currModel);
|
N_HORUS_FIELD(int8_t currModel);
|
||||||
N_HORUS_FIELD(uint8_t contrast);
|
N_HORUS_FIELD(uint8_t contrast);
|
||||||
@@ -285,7 +298,7 @@ PACK(typedef struct {
|
|||||||
uint8_t inactivityTimer;
|
uint8_t inactivityTimer;
|
||||||
SPLASH_MODE; /* 3bits */
|
SPLASH_MODE; /* 3bits */
|
||||||
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||||
uint8_t lightAutoOff;
|
uint8_t lightAutoOff;
|
||||||
uint8_t templateSetup; // RETA order for receiver channels
|
uint8_t templateSetup; // RETA order for receiver channels
|
||||||
int8_t PPM_Multiplier;
|
int8_t PPM_Multiplier;
|
||||||
int8_t hapticLength;
|
int8_t hapticLength;
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ void ConvertSpecialFunctions_217_to_218(CustomFunctionData_v218 * cf218, CustomF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConvertRadioData_217_to_218(RadioData_v218 & settings)
|
void ConvertRadioData_217_to_218(RadioData & settings)
|
||||||
{
|
{
|
||||||
RadioData_v216 settings_v217 = (RadioData_v216 &)settings;
|
RadioData_v216 settings_v217 = (RadioData_v216 &)settings;
|
||||||
|
|
||||||
@@ -864,7 +864,7 @@ void ConvertRadioData_217_to_218(RadioData_v218 & settings)
|
|||||||
settings.varioPitch = settings_v217.varioPitch;
|
settings.varioPitch = settings_v217.varioPitch;
|
||||||
settings.varioRange = settings_v217.varioRange;
|
settings.varioRange = settings_v217.varioRange;
|
||||||
settings.varioRepeat = settings_v217.varioRepeat;
|
settings.varioRepeat = settings_v217.varioRepeat;
|
||||||
ConvertSpecialFunctions_217_to_218(settings.customFn, settings_v217.customFn);
|
ConvertSpecialFunctions_217_to_218((CustomFunctionData_v218 *)settings.customFn, settings_v217.customFn);
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
settings.serial2Mode = settings_v217.serial2Mode;
|
settings.serial2Mode = settings_v217.serial2Mode;
|
||||||
@@ -1238,7 +1238,7 @@ void ConvertModel_217_to_218(ModelData & model)
|
|||||||
#warning "Conversion from v217 to v218 is broken"
|
#warning "Conversion from v217 to v218 is broken"
|
||||||
}
|
}
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
newModel.trainerData.mode = oldModel.trainerMode;
|
newModel.trainerMode = oldModel.trainerMode;
|
||||||
memcpy(newModel.scriptsData, oldModel.scriptsData, sizeof(newModel.scriptsData));
|
memcpy(newModel.scriptsData, oldModel.scriptsData, sizeof(newModel.scriptsData));
|
||||||
memcpy(newModel.inputNames, oldModel.inputNames, sizeof(newModel.inputNames));
|
memcpy(newModel.inputNames, oldModel.inputNames, sizeof(newModel.inputNames));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user