Remove SKY9X target
This commit is contained in:
committed by
Peter Feerick
parent
5601bd53b2
commit
09c49e24ee
@@ -53,10 +53,6 @@ enum Mix216Sources {
|
||||
MIXSRC216_LAST_POT = MIXSRC216_P3,
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
MIXSRC216_REa,
|
||||
MIXSRC216_LAST_ROTARY_ENCODER = MIXSRC216_REa,
|
||||
#endif
|
||||
|
||||
MIXSRC216_MAX,
|
||||
|
||||
@@ -527,13 +523,6 @@ PACK(typedef struct {
|
||||
uint8_t nPotsToWarn; \
|
||||
int8_t potsWarnPosition[NUM_POTS+NUM_SLIDERS]; \
|
||||
uint8_t spare[2];
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MODELDATA_EXTRA_216 \
|
||||
uint8_t externalModule; \
|
||||
ModuleData_v216 moduleData[NUM_MODULES+1]; \
|
||||
uint8_t nPotsToWarn; \
|
||||
int8_t potsWarnPosition[NUM_POTS+NUM_SLIDERS]; \
|
||||
uint8_t rxBattAlarms[2];
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -882,15 +871,6 @@ void convertRadioData_217_to_218(RadioData &settings)
|
||||
memcpy(settings.bluetoothName, settings_v217.bluetoothName, sizeof(settings.bluetoothName));
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
settings.txCurrentCalibration = settings_v217.txCurrentCalibration;
|
||||
settings.mAhWarn = settings_v217.mAhWarn;
|
||||
settings.mAhUsed = settings_v217.mAhUsed;
|
||||
settings.temperatureCalib = settings_v217.temperatureCalib;
|
||||
settings.optrexDisplay = settings_v217.optrexDisplay;
|
||||
settings.sticksGain = settings_v217.sticksGain;
|
||||
settings.rotarySteps = settings_v217.rotarySteps;
|
||||
#endif
|
||||
}
|
||||
|
||||
void convertModelData_216_to_217(ModelData &model)
|
||||
@@ -1206,9 +1186,6 @@ void convertModelData_217_to_218(ModelData &model)
|
||||
newModel.flightModeData[i].swtch = convertSwitch_217_to_218(oldModel.flightModeData[i].swtch);
|
||||
newModel.flightModeData[i].fadeIn = oldModel.flightModeData[i].fadeIn;
|
||||
newModel.flightModeData[i].fadeOut = oldModel.flightModeData[i].fadeOut;
|
||||
#if defined(PCBSKY9X)
|
||||
memcpy(newModel.flightModeData[i].rotaryEncoders, oldModel.flightModeData[i].rotaryEncoders, sizeof(newModel.flightModeData[i].rotaryEncoders));
|
||||
#endif
|
||||
memcpy(newModel.flightModeData[i].gvars, oldModel.flightModeData[i].gvars, sizeof(newModel.flightModeData[i].gvars));
|
||||
}
|
||||
newModel.thrTraceSrc = oldModel.thrTraceSrc;
|
||||
|
||||
@@ -110,12 +110,8 @@ void convertModelData_218_to_219(ModelData &model)
|
||||
{
|
||||
static_assert(sizeof(ModelData_v218) <= sizeof(ModelData), "ModelData size has been reduced");
|
||||
|
||||
#if defined(STM32)
|
||||
ModelData_v218 * oldModelAllocated = (ModelData_v218 *)malloc(sizeof(ModelData_v218));
|
||||
ModelData_v218 &oldModel = *oldModelAllocated;
|
||||
#else
|
||||
ModelData_v218 oldModel;
|
||||
#endif
|
||||
|
||||
memcpy(&oldModel, &model, sizeof(ModelData_v218));
|
||||
ModelData_v219 & newModel = (ModelData_v219 &) model;
|
||||
@@ -269,9 +265,7 @@ void convertModelData_218_to_219(ModelData &model)
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(PCBSKY9X)
|
||||
newModel.trainerData.mode = oldModel.trainerMode;
|
||||
#endif
|
||||
newModel.trainerData.channelsStart = oldModel.moduleData[NUM_MODULES].channelsStart;
|
||||
newModel.trainerData.channelsCount = oldModel.moduleData[NUM_MODULES].channelsCount;
|
||||
newModel.trainerData.frameLength = oldModel.moduleData[NUM_MODULES].ppm.frameLength;
|
||||
@@ -365,9 +359,7 @@ void convertModelData_218_to_219(ModelData &model)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
free(oldModelAllocated);
|
||||
#endif
|
||||
}
|
||||
|
||||
void convertRadioData_218_to_219(RadioData & settings)
|
||||
@@ -377,11 +369,9 @@ void convertRadioData_218_to_219(RadioData & settings)
|
||||
settings.version = 219;
|
||||
settings.variant = EEPROM_VARIANT;
|
||||
|
||||
#if defined(STM32)
|
||||
RadioData_v218 * oldSettingsAllocated = (RadioData_v218 *)malloc(sizeof(RadioData_v218));
|
||||
RadioData_v218 & oldSettings = *oldSettingsAllocated;
|
||||
memcpy(&oldSettings, &settings, sizeof(RadioData_v218));
|
||||
#endif
|
||||
|
||||
#if defined(PCBX9D) || defined(PCBX9DP)
|
||||
// no bluetooth before PCBREV 2019
|
||||
@@ -451,7 +441,5 @@ void convertRadioData_218_to_219(RadioData & settings)
|
||||
settings.pwrOnSpeed = 0;
|
||||
settings.pwrOffSpeed = 0;
|
||||
|
||||
#if defined(STM32)
|
||||
free(oldSettingsAllocated);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -112,17 +112,6 @@
|
||||
#define MAX_INPUTS_218 32
|
||||
#define MAX_TRAINER_CHANNELS_218 16
|
||||
#define MAX_TELEMETRY_SENSORS_218 32
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MAX_MODELS_218 60
|
||||
#define MAX_OUTPUT_CHANNELS_218 32 // number of real output channels CH1-CH32
|
||||
#define MAX_FLIGHT_MODES_218 9
|
||||
#define MAX_MIXERS_218 64
|
||||
#define MAX_EXPOS_218 32
|
||||
#define MAX_LOGICAL_SWITCHES_218 64
|
||||
#define MAX_SPECIAL_FUNCTIONS_218 64 // number of functions assigned to switches
|
||||
#define MAX_INPUTS_218 32
|
||||
#define MAX_TRAINER_CHANNELS_218 16
|
||||
#define MAX_TELEMETRY_SENSORS_218 32
|
||||
#endif
|
||||
|
||||
#if defined(COLORLCD)
|
||||
@@ -194,11 +183,7 @@ PACK(typedef struct {
|
||||
char name[LEN_TIMER_NAME_218];
|
||||
}) TimerData_v218;
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
#define ROTENC_DATA int16_t rotaryEncoders[1];
|
||||
#else
|
||||
#define ROTENC_DATA
|
||||
#endif
|
||||
|
||||
PACK(typedef struct {
|
||||
trim_t trim[NUM_TRIMS];
|
||||
@@ -343,8 +328,6 @@ PACK(struct FrSkyTelemetryData_v217 {
|
||||
#define MODELDATA_EXTRA_218 uint8_t spare:3; uint8_t trainerMode:3; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; ScriptData scriptsData[MAX_SCRIPTS_218]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[3 + 4];
|
||||
#elif defined(PCBTARANIS)
|
||||
#define MODELDATA_EXTRA_218 uint8_t spare:3; uint8_t trainerMode:3; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; ScriptData scriptsData[MAX_SCRIPTS_218]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS];
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MODELDATA_EXTRA_218 uint8_t spare:6; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS]; uint8_t rxBattAlarms[2];
|
||||
#endif
|
||||
|
||||
PACK(struct TelemetrySensor_218 {
|
||||
@@ -507,18 +490,6 @@ PACK(struct ModelData_v218 {
|
||||
char switchNames[NUM_SWITCHES_218][LEN_SWITCH_NAME_218]; \
|
||||
char anaNames[NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS][LEN_ANA_NAME_218]; \
|
||||
BLUETOOTH_FIELDS_218
|
||||
#elif defined(PCBSKY9X)
|
||||
#define EXTRA_GENERAL_FIELDS_218 \
|
||||
int8_t txCurrentCalibration; \
|
||||
int8_t temperatureWarn; \
|
||||
uint8_t mAhWarn; \
|
||||
uint16_t mAhUsed; \
|
||||
int8_t temperatureCalib; \
|
||||
uint8_t optrexDisplay; \
|
||||
uint8_t sticksGain; \
|
||||
uint8_t rotarySteps; \
|
||||
char switchNames[NUM_SWITCHES_218][LEN_SWITCH_NAME_218]; \
|
||||
char anaNames[NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS][LEN_ANA_NAME_218];
|
||||
#else
|
||||
#define EXTRA_GENERAL_FIELDS_218 EXTRA_GENERAL_FIELDS_GENERAL_218
|
||||
#endif
|
||||
|
||||
@@ -249,11 +249,7 @@ enum SwashType {
|
||||
|
||||
#define IS_MANUAL_RESET_TIMER(idx) (g_model.timers[idx].persistent == 2)
|
||||
|
||||
#if !defined(PCBSKY9X)
|
||||
#define TIMER_COUNTDOWN_START(x) (g_model.timers[x].countdownStart == 0 ? 20 : (g_model.timers[x].countdownStart == 1 ? 30 : (g_model.timers[x].countdownStart == -1 ? 10 : 5)))
|
||||
#else
|
||||
#define TIMER_COUNTDOWN_START(x) 10
|
||||
#endif
|
||||
|
||||
// #include "pulses/modules_constants.h"
|
||||
|
||||
|
||||
@@ -263,14 +263,7 @@ bool eeLoadGeneral(bool allowFixes)
|
||||
|
||||
if (g_eeGeneral.version != EEPROM_VER) {
|
||||
TRACE("EEPROM version %d instead of %d", g_eeGeneral.version, EEPROM_VER);
|
||||
#if defined(PCBSKY9X)
|
||||
if (!allowFixes)
|
||||
return false; // prevent eeprom from being wiped
|
||||
if (!eeConvert())
|
||||
return false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -302,10 +295,8 @@ void storageFormat()
|
||||
void eepromWriteWait(EepromWriteState state/* = EEPROM_IDLE*/)
|
||||
{
|
||||
while (eepromWriteState != state) {
|
||||
#if defined(STM32)
|
||||
// Waits a little bit for CS transitions
|
||||
RTOS_WAIT_MS(2);
|
||||
#endif
|
||||
eepromWriteProcess();
|
||||
#ifdef SIMU
|
||||
sleep(5/*ms*/);
|
||||
@@ -466,10 +457,6 @@ const char * eeBackupModel(uint8_t i_fileSrc)
|
||||
return SDCARD_ERROR(result);
|
||||
}
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
strcpy(statusLineMsg, "File ");
|
||||
strcpy(statusLineMsg+5, &buf[sizeof(MODELS_PATH)]);
|
||||
#endif
|
||||
|
||||
uint16_t size = eeModelSize(i_fileSrc);
|
||||
|
||||
@@ -499,9 +486,6 @@ const char * eeBackupModel(uint8_t i_fileSrc)
|
||||
|
||||
f_close(&archiveFile);
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
showStatusLine();
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#define WRITE_DELAY_10MS 1500 /* 15s */
|
||||
#elif defined(PCBTARANIS)
|
||||
#define WRITE_DELAY_10MS 500
|
||||
#elif defined(PCBSKY9X) && !defined(REV0)
|
||||
#define WRITE_DELAY_10MS 500
|
||||
#else
|
||||
#define WRITE_DELAY_10MS 200
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user