Merge remote-tracking branch 'origin/next' into bsongis/9XR-PRO_port
Conflicts: companion/src/eeprominterface.cpp companion/src/eeprominterface.h companion/src/firmwares/opentx/opentxeeprom.cpp companion/src/firmwares/opentx/opentxinterface.cpp companion/src/firmwares/opentx/opentxinterface.h companion/src/mdichild.cpp radio/src/Makefile
This commit is contained in:
@@ -200,94 +200,6 @@ int Er9xInterface::getSize(GeneralSettings &settings)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Er9xInterface::getCapability(const Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case FlightPhases:
|
||||
return 4;
|
||||
case Mixes:
|
||||
return ER9X_MAX_MIXERS;
|
||||
case PPMExtCtrl:
|
||||
return 1;
|
||||
case ModelTrainerEnable:
|
||||
return 1;
|
||||
case Timer2ThrTrig:
|
||||
return 1;
|
||||
case TrainerSwitch:
|
||||
return 1;
|
||||
case OffsetWeight:
|
||||
return 125;
|
||||
case BandgapMeasure:
|
||||
return 1;
|
||||
case PotScrolling:
|
||||
return 1;
|
||||
case SoundMod:
|
||||
return 1;
|
||||
case SoundPitch:
|
||||
return 1;
|
||||
case Haptic:
|
||||
return 1;
|
||||
case OwnerName:
|
||||
return 10;
|
||||
case Timers:
|
||||
return 1;
|
||||
case Pots:
|
||||
return 3;
|
||||
case Switches:
|
||||
return 7;
|
||||
case SwitchesPositions:
|
||||
return 9;
|
||||
case CustomFunctions:
|
||||
return 0;
|
||||
case LogicalSwitches:
|
||||
return 12;
|
||||
case CustomAndSwitches:
|
||||
return 5;
|
||||
case CSFunc:
|
||||
return 13;
|
||||
case Outputs:
|
||||
return 16;
|
||||
case ExtraChannels:
|
||||
return 0;
|
||||
case Simulation:
|
||||
return 1;
|
||||
case gsSwitchMask:
|
||||
return 1;
|
||||
case BLonStickMove:
|
||||
return 1;
|
||||
case Telemetry:
|
||||
return TM_HASTELEMETRY|TM_HASWSHH;
|
||||
case TelemetryUnits:
|
||||
return 1;
|
||||
case TelemetryMaxMultiplier:
|
||||
return 2;
|
||||
case MaxVolume:
|
||||
return 7;
|
||||
case SlowScale:
|
||||
return 1;
|
||||
case SlowRange:
|
||||
return 15;
|
||||
case LCDWidth:
|
||||
return 128;
|
||||
case VoicesAsNumbers:
|
||||
case TelemetryInternalAlarm:
|
||||
case HasPPMSim:
|
||||
case HasCrossTrims:
|
||||
case HasStickScroll:
|
||||
case HasAltitudeSel:
|
||||
case HasContrast:
|
||||
case HasVolume:
|
||||
case HasBlInvert:
|
||||
case ModelVoice:
|
||||
case Gvars:
|
||||
return 7;
|
||||
case GetThrSwitch:
|
||||
return DSW_THR;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int Er9xInterface::isAvailable(Protocol prot, int port)
|
||||
{
|
||||
switch (prot) {
|
||||
@@ -301,13 +213,6 @@ int Er9xInterface::isAvailable(Protocol prot, int port)
|
||||
}
|
||||
}
|
||||
|
||||
SimulatorInterface * Er9xInterface::getSimulator()
|
||||
{
|
||||
return NULL; // new Er9xSimulator(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Er9xInterface::appendTextElement(QDomDocument * qdoc, QDomElement * pe, QString name, QString value)
|
||||
{
|
||||
QDomElement e = qdoc->createElement(name);
|
||||
|
||||
@@ -46,12 +46,8 @@ class Er9xInterface : public EEPROMInterface
|
||||
|
||||
virtual int getSize(GeneralSettings &settings);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual int isAvailable(Protocol proto, int port=0);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
|
||||
@@ -48,6 +48,8 @@ class Er9xSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase() { return 0; }
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase) { return 0; }
|
||||
|
||||
virtual void wheelEvent(uint8_t steps) { }
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
@@ -244,90 +244,6 @@ int Ersky9xInterface::getSize(GeneralSettings &settings)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Ersky9xInterface::getCapability(const Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case Mixes:
|
||||
return ERSKY9X_MAX_MIXERS_V11;
|
||||
case PPMExtCtrl:
|
||||
return 1;
|
||||
case ModelTrainerEnable:
|
||||
return 1;
|
||||
case Timer2ThrTrig:
|
||||
return 1;
|
||||
case TrainerSwitch:
|
||||
return 1;
|
||||
case BandgapMeasure:
|
||||
return 1;
|
||||
case PotScrolling:
|
||||
return 1;
|
||||
case SoundMod:
|
||||
return 1;
|
||||
case SoundPitch:
|
||||
return 1;
|
||||
case Haptic:
|
||||
return 1;
|
||||
case OwnerName:
|
||||
return 10;
|
||||
case HasInputFilter:
|
||||
return 0;
|
||||
case ModelVoice:
|
||||
return 1;
|
||||
case Timers:
|
||||
return 2;
|
||||
case Pots:
|
||||
return 3;
|
||||
case Gvars:
|
||||
return 7;
|
||||
case Switches:
|
||||
return 7;
|
||||
case SwitchesPositions:
|
||||
return 9;
|
||||
case CustomFunctions:
|
||||
return 0;
|
||||
case LogicalSwitches:
|
||||
return ERSKY9X_NUM_CSW_V11;
|
||||
case CustomAndSwitches:
|
||||
return 1;
|
||||
case CSFunc:
|
||||
return 13;
|
||||
case Outputs:
|
||||
return ERSKY9X_NUM_CHNOUT_V11;
|
||||
case ExtraChannels:
|
||||
return 0;
|
||||
case Simulation:
|
||||
return 1;
|
||||
case gsSwitchMask:
|
||||
return 1;
|
||||
case BLonStickMove:
|
||||
return 1;
|
||||
case Telemetry:
|
||||
return TM_HASTELEMETRY|TM_HASWSHH;
|
||||
case TelemetryUnits:
|
||||
return 1;
|
||||
case OptrexDisplay:
|
||||
return 1;
|
||||
case HasAltitudeSel:
|
||||
case HasCurrentCalibration:
|
||||
case HasVolume:
|
||||
case HasBrightness:
|
||||
case HasContrast:
|
||||
return 1;
|
||||
case OffsetWeight:
|
||||
return 125;
|
||||
case MaxVolume:
|
||||
return 23;
|
||||
case TelemetryMaxMultiplier:
|
||||
return 2;
|
||||
case LCDWidth:
|
||||
return 128;
|
||||
case GetThrSwitch:
|
||||
return DSW_THR;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int Ersky9xInterface::isAvailable(Protocol prot, int port)
|
||||
{
|
||||
switch (prot) {
|
||||
@@ -341,13 +257,6 @@ int Ersky9xInterface::isAvailable(Protocol prot, int port)
|
||||
}
|
||||
}
|
||||
|
||||
SimulatorInterface * Ersky9xInterface::getSimulator()
|
||||
{
|
||||
return NULL; // new Ersky9xSimulator(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Ersky9xInterface::appendTextElement(QDomDocument * qdoc, QDomElement * pe, QString name, QString value)
|
||||
{
|
||||
QDomElement e = qdoc->createElement(name);
|
||||
|
||||
@@ -46,12 +46,8 @@ class Ersky9xInterface : public EEPROMInterface
|
||||
|
||||
virtual int getSize(GeneralSettings &settings);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual int isAvailable(Protocol proto, int port=0);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
|
||||
@@ -48,6 +48,8 @@ class Ersky9xSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase() { return 0; }
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase) { return 0; }
|
||||
|
||||
virtual void wheelEvent(uint8_t steps) { }
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
@@ -455,7 +455,7 @@ t_Gruvin9xModelData_v102::operator ModelData ()
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++)
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int i=0; i<G9X_MAX_MIXERS; i++)
|
||||
c9x.mixData[i] = mixData[i];
|
||||
@@ -526,7 +526,7 @@ t_Gruvin9xModelData_v103::operator ModelData ()
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++)
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int i=0; i<G9X_MAX_MIXERS; i++)
|
||||
c9x.mixData[i] = mixData[i];
|
||||
@@ -598,7 +598,7 @@ t_Gruvin9xModelData_v105::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (phaseData[i].trim[j] > 125) {
|
||||
@@ -689,7 +689,7 @@ t_Gruvin9xModelData_v106::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
||||
@@ -277,7 +277,7 @@ PACK(typedef struct t_Gruvin9xTimerData {
|
||||
t_Gruvin9xTimerData() { memset(this, 0, sizeof(t_Gruvin9xTimerData)); }
|
||||
}) Gruvin9xTimerData;
|
||||
|
||||
#define G9X_MAX_PHASES 5
|
||||
#define G9X_MAX_FLIGHT_MODES 5
|
||||
#define G9X_MAX_MIXERS 32
|
||||
#define G9X_MAX_EXPOS 14
|
||||
#define G9X_MAX_CURVE5 8
|
||||
@@ -312,7 +312,7 @@ PACK(typedef struct t_Gruvin9xModelData_v102 {
|
||||
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
@@ -344,7 +344,7 @@ PACK(typedef struct t_Gruvin9xModelData_v103 {
|
||||
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
@@ -377,7 +377,7 @@ PACK(typedef struct t_Gruvin9xModelData_v105 {
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
int16_t subtrim[NUM_STICKS];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
@@ -409,7 +409,7 @@ PACK(typedef struct t_Gruvin9xModelData_v106 {
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v106 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v106 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
|
||||
@@ -216,63 +216,6 @@ int Gruvin9xInterface::getSize(GeneralSettings &settings)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Gruvin9xInterface::getCapability(const Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case OwnerName:
|
||||
return 0;
|
||||
case Mixes:
|
||||
return G9X_MAX_MIXERS;
|
||||
case FlightPhases:
|
||||
return G9X_MAX_PHASES;
|
||||
case FlightPhasesHaveFades:
|
||||
return 1;
|
||||
case Timers:
|
||||
return 2;
|
||||
case Pots:
|
||||
return 3;
|
||||
case Switches:
|
||||
return 7;
|
||||
case SwitchesPositions:
|
||||
return 9;
|
||||
case CustomFunctions:
|
||||
return 12;
|
||||
case LogicalSwitches:
|
||||
return 12;
|
||||
case CSFunc:
|
||||
return 13;
|
||||
case Outputs:
|
||||
return 16;
|
||||
case ExtraChannels:
|
||||
return 0;
|
||||
case ExtendedTrims:
|
||||
return 500;
|
||||
case Simulation:
|
||||
return true;
|
||||
case OffsetWeight:
|
||||
return 125;
|
||||
case HasContrast:
|
||||
return true;
|
||||
case Telemetry:
|
||||
return TM_HASTELEMETRY|TM_HASWSHH;
|
||||
case TelemetryMaxMultiplier:
|
||||
return 1;
|
||||
case SlowScale:
|
||||
return 2;
|
||||
case SlowRange:
|
||||
return 15;
|
||||
case LCDWidth:
|
||||
return 128;
|
||||
case HasSDLogs:
|
||||
case Haptic:
|
||||
return 1;
|
||||
case GetThrSwitch:
|
||||
return DSW_THR;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int Gruvin9xInterface::isAvailable(Protocol proto, int port)
|
||||
{
|
||||
switch (proto) {
|
||||
@@ -287,8 +230,3 @@ int Gruvin9xInterface::isAvailable(Protocol proto, int port)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
SimulatorInterface * Gruvin9xInterface::getSimulator()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -47,12 +47,8 @@ class Gruvin9xInterface : public EEPROMInterface
|
||||
|
||||
virtual int getSize(GeneralSettings &settings);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual int isAvailable(Protocol proto, int port=0);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
protected:
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -460,7 +460,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -545,7 +545,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -634,7 +634,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -724,7 +724,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -811,7 +811,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
||||
@@ -197,7 +197,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
|
||||
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xPhaseData_v207 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v207 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -231,7 +231,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
|
||||
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -270,7 +270,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -310,7 +310,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -348,7 +348,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
|
||||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
||||
@@ -681,7 +681,7 @@ t_Open9xArmFrSkyData_v210::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.voltsSource = voltsSource;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.currentSource=currentSource;
|
||||
c9x.screens[0].type = 1;
|
||||
for (int i=0; i<4; i++) {
|
||||
@@ -709,7 +709,7 @@ t_Open9xArmFrSkyData_v211::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.voltsSource = voltsSource;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.currentSource=currentSource;
|
||||
c9x.screens[0].type = 1;
|
||||
for (int i=0; i<4; i++) {
|
||||
@@ -767,7 +767,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -856,7 +856,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -946,7 +946,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1030,7 +1030,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1117,7 +1117,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "open9xStockeeprom.h"
|
||||
|
||||
#define O9X_ARM_MAX_PHASES 9
|
||||
#define O9X_ARM_MAX_FLIGHT_MODES 9
|
||||
#define O9X_ARM_MAX_MIXERS 64
|
||||
#define O9X_ARM_MAX_EXPOS 32
|
||||
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
|
||||
@@ -346,7 +346,7 @@ PACK(typedef struct t_Open9xArmModelData_v208 {
|
||||
Open9xArmLogicalSwitchData_v208 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v208 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -385,7 +385,7 @@ PACK(typedef struct t_Open9xArmModelData_v209 {
|
||||
Open9xArmLogicalSwitchData_v209 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -425,7 +425,7 @@ PACK(typedef struct t_Open9xArmModelData_v210 {
|
||||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v210 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xArmFrSkyData_v210 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -464,7 +464,7 @@ PACK(typedef struct t_Open9xArmModelData_v211 {
|
||||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -502,7 +502,7 @@ PACK(typedef struct t_Open9xArmModelData_v212 {
|
||||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v210 swashR;
|
||||
Open9xArmPhaseData_v212 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v212 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
||||
@@ -89,7 +89,7 @@ t_Open9xExpoData_v201::operator ExpoData ()
|
||||
c9x.mode = mode;
|
||||
c9x.chn = chn;
|
||||
if (expo!=0 && curve!=0) {
|
||||
EEPROMWarnings += ::QObject::tr("Simultaneous usage of expo and curves is no longer supported in open9x") + "\n";
|
||||
EEPROMWarnings += ::QObject::tr("Simultaneous usage of expo and curves is no longer supported in OpenTX") + "\n";
|
||||
}
|
||||
else {
|
||||
if (curve == 0) {
|
||||
@@ -843,7 +843,7 @@ t_Open9xFrSkyData_v204::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.imperial = imperial;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.screens[0].type = 1;
|
||||
for (int i=0; i<4; i++)
|
||||
c9x.screens[0].body.bars[i] = bars[i];
|
||||
@@ -857,7 +857,7 @@ t_Open9xFrSkyData_v205::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.imperial = imperial;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.screens[0].type = 1;
|
||||
for (int i=0; i<4; i++)
|
||||
c9x.screens[0].body.bars[i] = bars[i];
|
||||
@@ -873,7 +873,7 @@ t_Open9xFrSkyData_v208::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.voltsSource = voltsSource;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.currentSource=currentSource;
|
||||
c9x.screens[0].type = 1;
|
||||
for (int i=0; i<4; i++)
|
||||
@@ -890,7 +890,7 @@ t_Open9xFrSkyData_v210::operator FrSkyData ()
|
||||
c9x.channels[1] = channels[1];
|
||||
c9x.usrProto = usrProto;
|
||||
c9x.voltsSource = voltsSource;
|
||||
c9x.blades = blades;
|
||||
c9x.blades = blades+2;
|
||||
c9x.currentSource=currentSource;
|
||||
|
||||
int lines_screen_index = 0;
|
||||
@@ -948,7 +948,7 @@ t_Open9xModelData_v201::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1022,7 +1022,7 @@ t_Open9xModelData_v202::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1098,7 +1098,7 @@ t_Open9xModelData_v203::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1172,7 +1172,7 @@ t_Open9xModelData_v204::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1251,7 +1251,7 @@ t_Open9xModelData_v205::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1337,7 +1337,7 @@ t_Open9xModelData_v208::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1430,7 +1430,7 @@ t_Open9xModelData_v209::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1524,7 +1524,7 @@ t_Open9xModelData_v210::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
@@ -1612,7 +1612,7 @@ t_Open9xModelData_v211::operator ModelData ()
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
||||
@@ -482,7 +482,7 @@ PACK(typedef struct t_Open9xTimerDataExtra {
|
||||
}) Open9xTimerDataExtra;
|
||||
|
||||
#define O9X_MAX_TIMERS 2
|
||||
#define O9X_MAX_PHASES 5
|
||||
#define O9X_MAX_FLIGHT_MODES 5
|
||||
#define O9X_MAX_MIXERS 32
|
||||
#define O9X_MAX_EXPOS 14
|
||||
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -520,7 +520,7 @@ PACK(typedef struct t_Open9xModelData_v201 {
|
||||
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v201 frsky;
|
||||
|
||||
operator ModelData();
|
||||
@@ -551,7 +551,7 @@ PACK(typedef struct t_Open9xModelData_v202 {
|
||||
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -584,7 +584,7 @@ PACK(typedef struct t_Open9xModelData_v203 {
|
||||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -617,7 +617,7 @@ PACK(typedef struct t_Open9xModelData_v204 {
|
||||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v204 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -650,7 +650,7 @@ PACK(typedef struct t_Open9xModelData_v205 {
|
||||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -685,7 +685,7 @@ PACK(typedef struct t_Open9xModelData_v208 {
|
||||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -724,7 +724,7 @@ PACK(typedef struct t_Open9xModelData_v209 {
|
||||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -764,7 +764,7 @@ PACK(typedef struct t_Open9xModelData_v210 {
|
||||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
@@ -802,7 +802,7 @@ PACK(typedef struct t_Open9xModelData_v211 {
|
||||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT 3
|
||||
|
||||
@@ -74,6 +75,7 @@ namespace Open9xGruvin9x {
|
||||
#include "radio/src/simpgmspace.cpp"
|
||||
#include "radio/src/templates.cpp"
|
||||
#include "radio/src/translations.cpp"
|
||||
#include "radio/src/fonts.cpp"
|
||||
#include "radio/src/audio_avr.cpp"
|
||||
#include "radio/src/buzzer.cpp"
|
||||
#include "radio/src/targets/gruvin9x/somo14d.cpp"
|
||||
@@ -105,8 +107,7 @@ uint8_t getStickMode()
|
||||
|
||||
using namespace Open9xGruvin9x;
|
||||
|
||||
Open9xGruvin9xSimulator::Open9xGruvin9xSimulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
Open9xGruvin9xSimulator::Open9xGruvin9xSimulator()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -199,6 +200,13 @@ unsigned int Open9xGruvin9xSimulator::getPhase()
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xGruvin9xSimulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xGruvin9xSimulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class RadioData;
|
||||
class OpenTxInterface;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xGruvin9xSimulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xGruvin9xSimulator(OpenTxInterface *);
|
||||
Open9xGruvin9xSimulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -50,13 +50,12 @@ class Open9xGruvin9xSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase();
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase);
|
||||
|
||||
virtual void wheelEvent(uint8_t steps);
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
protected:
|
||||
|
||||
OpenTxInterface * open9xInterface;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT SIMU_M128_VARIANTS
|
||||
#define GAUGES
|
||||
@@ -73,6 +74,7 @@ namespace Open9xM128 {
|
||||
#include "radio/src/simpgmspace.cpp"
|
||||
#include "radio/src/templates.cpp"
|
||||
#include "radio/src/translations.cpp"
|
||||
#include "radio/src/fonts.cpp"
|
||||
#include "radio/src/audio_avr.cpp"
|
||||
#include "radio/src/targets/stock/voice.cpp"
|
||||
#include "radio/src/telemetry/frsky.cpp"
|
||||
@@ -103,8 +105,7 @@ uint8_t getStickMode()
|
||||
|
||||
using namespace Open9xM128;
|
||||
|
||||
Open9xM128Simulator::Open9xM128Simulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
Open9xM128Simulator::Open9xM128Simulator()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -190,6 +191,13 @@ unsigned int Open9xM128Simulator::getPhase()
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xM128Simulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xM128Simulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class RadioData;
|
||||
class OpenTxInterface;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xM128Simulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xM128Simulator(OpenTxInterface *);
|
||||
Open9xM128Simulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -50,13 +50,12 @@ class Open9xM128Simulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase();
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase);
|
||||
|
||||
virtual void wheelEvent(uint8_t steps);
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
protected:
|
||||
|
||||
OpenTxInterface * open9xInterface;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,9 @@
|
||||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define EEPROM_VARIANT 3
|
||||
|
||||
#undef min
|
||||
@@ -90,6 +92,7 @@ namespace Open9xSky9x {
|
||||
#include "radio/src/simpgmspace.cpp"
|
||||
#include "radio/src/templates.cpp"
|
||||
#include "radio/src/translations.cpp"
|
||||
#include "radio/src/fonts.cpp"
|
||||
#include "radio/src/telemetry/frsky.cpp"
|
||||
#include "radio/src/targets/sky9x/audio_driver.cpp"
|
||||
#include "radio/src/audio_arm.cpp"
|
||||
@@ -133,8 +136,7 @@ uint8_t getStickMode()
|
||||
|
||||
using namespace Open9xSky9x;
|
||||
|
||||
Open9xSky9xSimulator::Open9xSky9xSimulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
Open9xSky9xSimulator::Open9xSky9xSimulator()
|
||||
{
|
||||
QString path=g.profile[g.id()].sdPath()+"/";
|
||||
int i=0;
|
||||
@@ -231,6 +233,13 @@ unsigned int Open9xSky9xSimulator::getPhase()
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xSky9xSimulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xSky9xSimulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class RadioData;
|
||||
class OpenTxInterface;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xSky9xSimulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xSky9xSimulator(OpenTxInterface *);
|
||||
Open9xSky9xSimulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -50,13 +50,12 @@ class Open9xSky9xSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase();
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase);
|
||||
|
||||
virtual void wheelEvent(uint8_t steps);
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
protected:
|
||||
|
||||
OpenTxInterface * open9xInterface;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#define PCBTARANIS
|
||||
#define CPUARM
|
||||
#define HELI
|
||||
#define TEMPLATES
|
||||
#define SPLASH
|
||||
#define FLIGHT_MODES
|
||||
#define FRSKY
|
||||
@@ -53,6 +52,10 @@
|
||||
#define LUA
|
||||
#define LUA_MODEL_SCRIPTS
|
||||
#define EEPROM_VARIANT 3
|
||||
#define HAPTIC
|
||||
#define REVPLUS
|
||||
|
||||
#define NUM_POTS 5
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
@@ -71,7 +74,6 @@ inline int geteepromsize() {
|
||||
#include "radio/src/protocols/ppm_arm.cpp"
|
||||
#include "radio/src/protocols/pxx_arm.cpp"
|
||||
#include "radio/src/protocols/dsm2_arm.cpp"
|
||||
#include "radio/src/targets/taranis/pwr_driver.cpp"
|
||||
#include "radio/src/eeprom_common.cpp"
|
||||
#include "radio/src/eeprom_conversions.cpp"
|
||||
#include "radio/src/eeprom_rlc.cpp"
|
||||
@@ -93,17 +95,20 @@ inline int geteepromsize() {
|
||||
#include "radio/src/gui/view_text.cpp"
|
||||
#include "radio/src/gui/view_about.cpp"
|
||||
#include "radio/src/lcd.cpp"
|
||||
#include "radio/src/strhelpers.cpp"
|
||||
#include "radio/src/logs.cpp"
|
||||
#include "radio/src/rtc.cpp"
|
||||
#include "radio/src/targets/taranis/keys_driver.cpp"
|
||||
#include "radio/src/keys.cpp"
|
||||
#include "radio/src/bmp.cpp"
|
||||
#include "radio/src/haptic.cpp"
|
||||
#include "radio/src/targets/taranis/haptic_driver.cpp"
|
||||
// TODO Because FatFS in not C++ there cannot be namespaces there and the functions are defined several times!
|
||||
#undef SDCARD
|
||||
#include "radio/src/simpgmspace.cpp"
|
||||
#define SDCARD
|
||||
#include "radio/src/templates.cpp"
|
||||
#include "radio/src/translations.cpp"
|
||||
#include "radio/src/fonts.cpp"
|
||||
#include "radio/src/telemetry/frsky_sport.cpp"
|
||||
#include "radio/src/targets/taranis/audio_driver.cpp"
|
||||
#include "radio/src/audio_arm.cpp"
|
||||
@@ -152,9 +157,6 @@ int16_t g_anas[NUM_STICKS+5];
|
||||
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
{
|
||||
if (chan == 8)
|
||||
return 1800;
|
||||
else
|
||||
return g_anas[chan];
|
||||
}
|
||||
|
||||
@@ -178,8 +180,7 @@ void resetTrims()
|
||||
|
||||
using namespace Open9xX9D;
|
||||
|
||||
OpentxTaranisSimulator::OpentxTaranisSimulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
OpentxTaranisSimulator::OpentxTaranisSimulator()
|
||||
{
|
||||
taranisSimulatorBoard = GetEepromInterface()->getBoard();
|
||||
QString path=g.profile[g.id()].sdPath()+"/";
|
||||
@@ -273,6 +274,13 @@ unsigned int OpentxTaranisSimulator::getPhase()
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * OpentxTaranisSimulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * OpentxTaranisSimulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class RadioData;
|
||||
class OpenTxInterface;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class OpentxTaranisSimulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
OpentxTaranisSimulator(OpenTxInterface *);
|
||||
OpentxTaranisSimulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -50,13 +50,12 @@ class OpentxTaranisSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase();
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase);
|
||||
|
||||
virtual void wheelEvent(uint8_t steps);
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
protected:
|
||||
|
||||
OpenTxInterface * open9xInterface;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#define HAS_PERSISTENT_TIMERS(board) (IS_ARM(board) || board == BOARD_GRUVIN9X)
|
||||
#define HAS_LARGE_LCD(board) IS_TARANIS(board)
|
||||
#define MAX_VIEWS(board) (HAS_LARGE_LCD(board) ? 2 : 256)
|
||||
#define MAX_POTS(board, version) (IS_TARANIS(board) ? (version>=216 ? 5 : 4) : 3)
|
||||
#define MAX_POTS(board) (IS_TARANIS(board) ? 5 : 3)
|
||||
#define MAX_SWITCHES(board) (IS_TARANIS(board) ? 8 : 7)
|
||||
#define MAX_SWITCHES_POSITION(board) (IS_TARANIS(board) ? 22 : 9)
|
||||
#define MAX_ROTARY_ENCODERS(board) (board==BOARD_GRUVIN9X ? 2 : (IS_SKY9X(board) ? 1 : 0))
|
||||
#define MAX_PHASES(board, version) (IS_ARM(board) ? 9 : (IS_DBLRAM(board, version) ? 6 : 5))
|
||||
#define MAX_FLIGHT_MODES(board, version) (IS_ARM(board) ? 9 : (IS_DBLRAM(board, version) ? 6 : 5))
|
||||
#define MAX_MIXERS(board, version) (IS_ARM(board) ? 64 : 32)
|
||||
#define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16)
|
||||
#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14))
|
||||
@@ -86,8 +86,17 @@ class SwitchesConversionTable: public ConversionTable {
|
||||
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
|
||||
}
|
||||
|
||||
addConversion(RawSwitch(SWITCH_TYPE_OFF), -val+offset);
|
||||
addConversion(RawSwitch(SWITCH_TYPE_ON), val++);
|
||||
if (!(flags & POPULATE_TIMER_MODES)) {
|
||||
addConversion(RawSwitch(SWITCH_TYPE_OFF), -val+offset);
|
||||
addConversion(RawSwitch(SWITCH_TYPE_ON), val++);
|
||||
}
|
||||
|
||||
if (IS_ARM(board)) {
|
||||
for (int i=1; i<=MAX_FLIGHT_MODES(board, version); i++) {
|
||||
addConversion(RawSwitch(SWITCH_TYPE_FLIGHT_MODE, -i), -val+offset);
|
||||
addConversion(RawSwitch(SWITCH_TYPE_FLIGHT_MODE, i), val++);
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 216) {
|
||||
// previous "moment" switches
|
||||
@@ -127,12 +136,12 @@ class SwitchesConversionTable: public ConversionTable {
|
||||
SwitchesConversionTable * table;
|
||||
};
|
||||
|
||||
static std::list<Cache> internalCache;
|
||||
|
||||
public:
|
||||
|
||||
static SwitchesConversionTable * getInstance(BoardEnum board, unsigned int version, unsigned long flags=0)
|
||||
{
|
||||
static std::list<Cache> internalCache;
|
||||
|
||||
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
|
||||
Cache element = *it;
|
||||
if (element.board == board && element.version == version && element.flags == flags)
|
||||
@@ -143,8 +152,18 @@ class SwitchesConversionTable: public ConversionTable {
|
||||
internalCache.push_back(element);
|
||||
return element.table;
|
||||
}
|
||||
static void Cleanup()
|
||||
{
|
||||
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
|
||||
Cache element = *it;
|
||||
delete element.table;
|
||||
}
|
||||
internalCache.clear();
|
||||
}
|
||||
};
|
||||
|
||||
std::list<SwitchesConversionTable::Cache> SwitchesConversionTable::internalCache;
|
||||
|
||||
#define FLAG_NONONE 0x01
|
||||
#define FLAG_NOSWITCHES 0x02
|
||||
#define FLAG_NOTELEMETRY 0x04
|
||||
@@ -172,8 +191,11 @@ class SourcesConversionTable: public ConversionTable {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<4+MAX_POTS(board, version); i++)
|
||||
for (int i=0; i<4+MAX_POTS(board); i++) {
|
||||
if (IS_TARANIS(board) && version < 216 && i==6)
|
||||
continue;
|
||||
addConversion(RawSource(SOURCE_TYPE_STICK, i), val++);
|
||||
}
|
||||
|
||||
for (int i=0; i<MAX_ROTARY_ENCODERS(board); i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_ROTARY_ENCODER, 0), val++);
|
||||
@@ -235,11 +257,17 @@ class SourcesConversionTable: public ConversionTable {
|
||||
|
||||
for (int i=0; i<TELEMETRY_SOURCE_ACC; i++) {
|
||||
if (version < 216) {
|
||||
if (i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
|
||||
continue;
|
||||
}
|
||||
if (!IS_ARM(board)) {
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR|| i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
|
||||
continue;
|
||||
}
|
||||
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
|
||||
if (version >= 216 && IS_ARM(board)) {
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME)
|
||||
val += 5;
|
||||
if (i==TELEMETRY_SOURCE_DTE)
|
||||
val += 5;
|
||||
if (i==TELEMETRY_SOURCE_POWER_MAX)
|
||||
@@ -272,13 +300,12 @@ class SourcesConversionTable: public ConversionTable {
|
||||
unsigned long flags;
|
||||
SourcesConversionTable * table;
|
||||
};
|
||||
static std::list<Cache> internalCache;
|
||||
|
||||
public:
|
||||
|
||||
static SourcesConversionTable * getInstance(BoardEnum board, unsigned int version, unsigned int variant, unsigned long flags=0)
|
||||
{
|
||||
static std::list<Cache> internalCache;
|
||||
|
||||
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
|
||||
Cache element = *it;
|
||||
if (element.board == board && element.version == version && element.variant == variant && element.flags == flags)
|
||||
@@ -289,8 +316,50 @@ class SourcesConversionTable: public ConversionTable {
|
||||
internalCache.push_back(element);
|
||||
return element.table;
|
||||
}
|
||||
static void Cleanup()
|
||||
{
|
||||
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
|
||||
Cache element = *it;
|
||||
delete element.table;
|
||||
}
|
||||
internalCache.clear();
|
||||
}
|
||||
};
|
||||
|
||||
std::list<SourcesConversionTable::Cache> SourcesConversionTable::internalCache;
|
||||
|
||||
void OpenTxEepromCleanup(void)
|
||||
{
|
||||
SourcesConversionTable::Cleanup();
|
||||
SwitchesConversionTable::Cleanup();
|
||||
}
|
||||
|
||||
ThrottleSourceConversionTable::ThrottleSourceConversionTable(BoardEnum board, unsigned int version)
|
||||
{
|
||||
int val=0;
|
||||
|
||||
addConversion(THROTTLE_SOURCE_THR, val++);
|
||||
|
||||
if (IS_TARANIS(board)) {
|
||||
addConversion(THROTTLE_SOURCE_S1, val++);
|
||||
addConversion(THROTTLE_SOURCE_S2, val++);
|
||||
if (version >= 216)
|
||||
addConversion(THROTTLE_SOURCE_S3, val++);
|
||||
addConversion(THROTTLE_SOURCE_LS, val++);
|
||||
addConversion(THROTTLE_SOURCE_RS, val++);
|
||||
}
|
||||
else {
|
||||
addConversion(THROTTLE_SOURCE_P1, val++);
|
||||
addConversion(THROTTLE_SOURCE_P2, val++);
|
||||
addConversion(THROTTLE_SOURCE_P3, val++);
|
||||
}
|
||||
|
||||
for (int i=0; i<MAX_CHANNELS(board, version); i++) {
|
||||
addConversion(THROTTLE_SOURCE_FIRST_CHANNEL+i, val++);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <int N>
|
||||
class SwitchField: public ConversionField< SignedField<N> > {
|
||||
public:
|
||||
@@ -384,8 +453,13 @@ class TelemetrySourcesConversionTable: public ConversionTable {
|
||||
addConversion(1+TELEMETRY_SOURCE_T2_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_SPEED_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_DIST_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_CELL_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_VFAS_MIN, val++);
|
||||
if (version >= 216) {
|
||||
addConversion(1+TELEMETRY_SOURCE_ASPEED_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_CELL_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_CELLS_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_VFAS_MIN, val++);
|
||||
}
|
||||
addConversion(1+TELEMETRY_SOURCE_CURRENT_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_POWER_MAX, val++);
|
||||
if (IS_ARM(board) && version >= 216) {
|
||||
for (int i=0; i<5; i++)
|
||||
@@ -442,176 +516,6 @@ class SourceField: public ConversionField< UnsignedField<N> > {
|
||||
unsigned int _source;
|
||||
};
|
||||
|
||||
class CurveReferenceField: public TransformedField {
|
||||
public:
|
||||
CurveReferenceField(CurveReference & curve, BoardEnum board, unsigned int version):
|
||||
TransformedField(internalField),
|
||||
curve(curve),
|
||||
_curve_type(0)
|
||||
{
|
||||
internalField.Append(new UnsignedField<8>(_curve_type));
|
||||
internalField.Append(new SignedField<8>(curve.value));
|
||||
}
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
if (curve.value != 0)
|
||||
_curve_type = (unsigned int)curve.type;
|
||||
else
|
||||
_curve_type = 0;
|
||||
}
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
curve.type = (CurveReference::CurveRefType)_curve_type;
|
||||
}
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
CurveReference & curve;
|
||||
unsigned int _curve_type;
|
||||
};
|
||||
|
||||
class HeliField: public StructField {
|
||||
public:
|
||||
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
|
||||
{
|
||||
Append(new BoolField<1>(heli.invertELE));
|
||||
Append(new BoolField<1>(heli.invertAIL));
|
||||
Append(new BoolField<1>(heli.invertCOL));
|
||||
Append(new UnsignedField<5>(heli.type));
|
||||
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
|
||||
//, FLAG_NOSWITCHES)); Fix shift in collective
|
||||
Append(new UnsignedField<8>(heli.value));
|
||||
}
|
||||
};
|
||||
|
||||
class PhaseField: public TransformedField {
|
||||
public:
|
||||
PhaseField(PhaseData & phase, int index, BoardEnum board, unsigned int version):
|
||||
TransformedField(internalField),
|
||||
internalField("Phase"),
|
||||
phase(phase),
|
||||
index(index),
|
||||
board(board),
|
||||
version(version),
|
||||
rotencCount(IS_ARM(board) ? 1 : (board == BOARD_GRUVIN9X ? 2 : 0))
|
||||
{
|
||||
if (board == BOARD_STOCK || (board==BOARD_M128 && version>=215)) {
|
||||
// On stock we use 10bits per trim
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
internalField.Append(new SignedField<8>(trimBase[i]));
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
internalField.Append(new SignedField<2>(trimExt[i]));
|
||||
}
|
||||
else if (board == BOARD_TARANIS && version >= 216) {
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
internalField.Append(new SignedField<11>(phase.trim[i]));
|
||||
internalField.Append(new UnsignedField<5>(trimMode[i]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
internalField.Append(new SignedField<16>(trimBase[i]));
|
||||
}
|
||||
|
||||
internalField.Append(new SwitchField<8>(phase.swtch, board, version));
|
||||
if (HAS_LARGE_LCD(board))
|
||||
internalField.Append(new ZCharField<10>(phase.name));
|
||||
else
|
||||
internalField.Append(new ZCharField<6>(phase.name));
|
||||
|
||||
if (IS_ARM(board) && version >= 214) {
|
||||
internalField.Append(new UnsignedField<8>(phase.fadeIn));
|
||||
internalField.Append(new UnsignedField<8>(phase.fadeOut));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new UnsignedField<4>(phase.fadeIn));
|
||||
internalField.Append(new UnsignedField<4>(phase.fadeOut));
|
||||
}
|
||||
|
||||
for (int i=0; i<rotencCount; i++) {
|
||||
internalField.Append(new SignedField<16>(phase.rotaryEncoders[i]));
|
||||
}
|
||||
|
||||
if (board != BOARD_STOCK && (board != BOARD_M128 || version < 215)) {
|
||||
for (int i=0; i<MAX_GVARS(board, version); i++) {
|
||||
internalField.Append(new SignedField<16>(phase.gvars[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
if (board == BOARD_TARANIS && version >= 216) {
|
||||
if (phase.trimMode[i] < 0)
|
||||
trimMode[i] = TRIM_MODE_NONE;
|
||||
else
|
||||
trimMode[i] = 2*phase.trimRef[i] + phase.trimMode[i];
|
||||
}
|
||||
else {
|
||||
int trim;
|
||||
if (phase.trimMode[i] < 0)
|
||||
trim = 0;
|
||||
else if (phase.trimRef[i] != index)
|
||||
trim = 501 + phase.trimRef[i] - (phase.trimRef[i] > index ? 1 : 0);
|
||||
else
|
||||
trim = std::max(-500, std::min(500, phase.trim[i]));
|
||||
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) {
|
||||
trimBase[i] = trim >> 2;
|
||||
trimExt[i] = (trim & 0x03);
|
||||
}
|
||||
else {
|
||||
trimBase[i] = trim;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
if (board == BOARD_TARANIS && version >= 216) {
|
||||
if (trimMode[i] == TRIM_MODE_NONE) {
|
||||
phase.trimMode[i] = -1;
|
||||
}
|
||||
else {
|
||||
phase.trimMode[i] = trimMode[i] % 2;
|
||||
phase.trimRef[i] = trimMode[i] / 2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
int trim;
|
||||
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215))
|
||||
trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03);
|
||||
else
|
||||
trim = trimBase[i];
|
||||
if (trim > 500) {
|
||||
phase.trimRef[i] = trim - 501;
|
||||
if (phase.trimRef[i] >= index)
|
||||
phase.trimRef[i] += 1;
|
||||
phase.trim[i] = 0;
|
||||
}
|
||||
else {
|
||||
phase.trim[i] = trim;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
PhaseData & phase;
|
||||
int index;
|
||||
BoardEnum board;
|
||||
unsigned int version;
|
||||
int rotencCount;
|
||||
int trimBase[NUM_STICKS];
|
||||
int trimExt[NUM_STICKS];
|
||||
unsigned int trimMode[NUM_STICKS];
|
||||
};
|
||||
|
||||
|
||||
int smallGvarToEEPROM(int gvar)
|
||||
{
|
||||
@@ -635,7 +539,6 @@ int smallGvarToC9x(int gvar)
|
||||
return gvar;
|
||||
}
|
||||
|
||||
|
||||
void splitGvarParam(const int gvar, int & _gvar, unsigned int & _gvarParam, const BoardEnum board, const int version)
|
||||
{
|
||||
if (version >= 214 || (!IS_ARM(board) && version >= 213)) {
|
||||
@@ -672,11 +575,11 @@ void splitGvarParam(const int gvar, int & _gvar, unsigned int & _gvarParam, cons
|
||||
void concatGvarParam(int & gvar, const int _gvar, const unsigned int _gvarParam, const BoardEnum board, const int version)
|
||||
{
|
||||
if (version >= 214 || (!IS_ARM(board) && version >= 213)) {
|
||||
gvar = _gvar;
|
||||
gvar = _gvar;
|
||||
if (gvar<0) gvar+=256; // remove 2er complement, because 8bit part is in this case unsigned
|
||||
if (_gvarParam) { // here is the real sign bit
|
||||
gvar|=-256; // set all higher bits to simulate negative value
|
||||
}
|
||||
if (_gvarParam) { // here is the real sign bit
|
||||
gvar|=-256; // set all higher bits to simulate negative value
|
||||
}
|
||||
|
||||
if (gvar>245) {
|
||||
gvar = gvar-256 - 10000;
|
||||
@@ -697,32 +600,36 @@ void concatGvarParam(int & gvar, const int _gvar, const unsigned int _gvarParam,
|
||||
}
|
||||
}
|
||||
|
||||
void exportGvarParam(const int gvar, int & _gvar)
|
||||
void exportGvarParam(const int gvar, int & _gvar, int version)
|
||||
{
|
||||
int GV1 = (version >= 216 ? 4096 : 512);
|
||||
|
||||
if (gvar < -10000) {
|
||||
_gvar = 512 + gvar + 10000;
|
||||
_gvar = GV1 + gvar + 10000;
|
||||
}
|
||||
else if (gvar > 10000) {
|
||||
_gvar = 512 + gvar - 10001;
|
||||
_gvar = GV1 + gvar - 10001;
|
||||
}
|
||||
else {
|
||||
_gvar = gvar;
|
||||
}
|
||||
}
|
||||
|
||||
void importGvarParam(int & gvar, const int _gvar)
|
||||
void importGvarParam(int & gvar, const int _gvar, int version)
|
||||
{
|
||||
if (_gvar >= 512) {
|
||||
gvar = 10001 + _gvar - 512;
|
||||
int GV1 = (version >= 216 ? 4096 : 512);
|
||||
|
||||
if (_gvar >= GV1) {
|
||||
gvar = 10001 + _gvar - GV1;
|
||||
}
|
||||
else if (_gvar >= 512-5) {
|
||||
gvar = -10000 + _gvar - 512;
|
||||
else if (_gvar >= GV1-9) {
|
||||
gvar = -10000 + _gvar - GV1;
|
||||
}
|
||||
else if (_gvar < -512) {
|
||||
gvar = -10000 + _gvar + 513;
|
||||
else if (_gvar < -GV1) {
|
||||
gvar = -10000 + _gvar + GV1 + 1;
|
||||
}
|
||||
else if (_gvar < -512+5) {
|
||||
gvar = 10000 + _gvar + 513;
|
||||
else if (_gvar < -GV1+9) {
|
||||
gvar = 10000 + _gvar + GV1 + 1;
|
||||
}
|
||||
else {
|
||||
gvar = _gvar;
|
||||
@@ -731,6 +638,194 @@ void importGvarParam(int & gvar, const int _gvar)
|
||||
// qDebug() << QString("import") << _gvar << gvar;
|
||||
}
|
||||
|
||||
class CurveReferenceField: public TransformedField {
|
||||
public:
|
||||
CurveReferenceField(CurveReference & curve, BoardEnum board, unsigned int version):
|
||||
TransformedField(internalField),
|
||||
curve(curve),
|
||||
_curve_type(0),
|
||||
_curve_value(0)
|
||||
{
|
||||
internalField.Append(new UnsignedField<8>(_curve_type));
|
||||
internalField.Append(new SignedField<8>(_curve_value));
|
||||
}
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
if (curve.value != 0) {
|
||||
_curve_type = (unsigned int)curve.type;
|
||||
_curve_value = smallGvarToEEPROM(curve.value);
|
||||
}
|
||||
else {
|
||||
_curve_type = 0;
|
||||
_curve_value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
curve.type = (CurveReference::CurveRefType)_curve_type;
|
||||
curve.value = smallGvarToC9x(_curve_value);
|
||||
}
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
CurveReference & curve;
|
||||
unsigned int _curve_type;
|
||||
int _curve_value;
|
||||
};
|
||||
|
||||
class HeliField: public StructField {
|
||||
public:
|
||||
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
|
||||
{
|
||||
Append(new BoolField<1>(heli.invertELE));
|
||||
Append(new BoolField<1>(heli.invertAIL));
|
||||
Append(new BoolField<1>(heli.invertCOL));
|
||||
Append(new UnsignedField<5>(heli.type));
|
||||
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
|
||||
//, FLAG_NOSWITCHES)); Fix shift in collective
|
||||
Append(new UnsignedField<8>(heli.value));
|
||||
}
|
||||
};
|
||||
|
||||
class FlightModeField: public TransformedField {
|
||||
public:
|
||||
FlightModeField(PhaseData & phase, int index, BoardEnum board, unsigned int version):
|
||||
TransformedField(internalField),
|
||||
internalField("Phase"),
|
||||
phase(phase),
|
||||
index(index),
|
||||
board(board),
|
||||
version(version),
|
||||
rotencCount(IS_ARM(board) ? 1 : (board == BOARD_GRUVIN9X ? 2 : 0))
|
||||
{
|
||||
if (board == BOARD_STOCK || (board==BOARD_M128 && version>=215)) {
|
||||
// On stock we use 10bits per trim
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
internalField.Append(new SignedField<8>(trimBase[i]));
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
internalField.Append(new SignedField<2>(trimExt[i]));
|
||||
}
|
||||
else if (IS_TARANIS(board) && version >= 216) {
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
internalField.Append(new SignedField<11>(phase.trim[i]));
|
||||
internalField.Append(new UnsignedField<5>(trimMode[i]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
internalField.Append(new SignedField<16>(trimBase[i]));
|
||||
}
|
||||
}
|
||||
|
||||
internalField.Append(new SwitchField<8>(phase.swtch, board, version));
|
||||
if (HAS_LARGE_LCD(board))
|
||||
internalField.Append(new ZCharField<10>(phase.name));
|
||||
else
|
||||
internalField.Append(new ZCharField<6>(phase.name));
|
||||
|
||||
if (IS_ARM(board) && version >= 214) {
|
||||
internalField.Append(new UnsignedField<8>(phase.fadeIn));
|
||||
internalField.Append(new UnsignedField<8>(phase.fadeOut));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new UnsignedField<4>(phase.fadeIn));
|
||||
internalField.Append(new UnsignedField<4>(phase.fadeOut));
|
||||
}
|
||||
|
||||
for (int i=0; i<rotencCount; i++) {
|
||||
internalField.Append(new SignedField<16>(phase.rotaryEncoders[i]));
|
||||
}
|
||||
|
||||
if (board != BOARD_STOCK && (board != BOARD_M128 || version < 215)) {
|
||||
for (int i=0; i<MAX_GVARS(board, version); i++) {
|
||||
internalField.Append(new SignedField<16>(phase.gvars[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
if (phase.trimMode[i] < 0)
|
||||
trimMode[i] = TRIM_MODE_NONE;
|
||||
else
|
||||
trimMode[i] = 2*phase.trimRef[i] + phase.trimMode[i];
|
||||
}
|
||||
else {
|
||||
int trim;
|
||||
if (phase.trimMode[i] < 0)
|
||||
trim = 0;
|
||||
else if (phase.trimRef[i] != index)
|
||||
trim = 501 + phase.trimRef[i] - (phase.trimRef[i] > index ? 1 : 0);
|
||||
else
|
||||
trim = std::max(-500, std::min(500, phase.trim[i]));
|
||||
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) {
|
||||
trimBase[i] = trim >> 2;
|
||||
trimExt[i] = (trim & 0x03);
|
||||
}
|
||||
else {
|
||||
trimBase[i] = trim;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
for (int i=0; i<NUM_STICKS; i++) {
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
if (trimMode[i] == TRIM_MODE_NONE) {
|
||||
phase.trimMode[i] = -1;
|
||||
}
|
||||
else {
|
||||
phase.trimMode[i] = trimMode[i] % 2;
|
||||
phase.trimRef[i] = trimMode[i] / 2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (phase.swtch == RawSwitch(SWITCH_TYPE_NONE) && index > 0) {
|
||||
phase.trimRef[i] = 0;
|
||||
phase.trimMode[i] = 0;
|
||||
phase.trim[i] = 0;
|
||||
}
|
||||
else {
|
||||
int trim;
|
||||
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215))
|
||||
trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03);
|
||||
else
|
||||
trim = trimBase[i];
|
||||
if (trim > 500) {
|
||||
phase.trimRef[i] = trim - 501;
|
||||
if (phase.trimRef[i] >= index)
|
||||
phase.trimRef[i] += 1;
|
||||
phase.trimMode[i] = 0;
|
||||
phase.trim[i] = 0;
|
||||
}
|
||||
else {
|
||||
phase.trimRef[i] = index/*own trim*/;
|
||||
phase.trimMode[i] = 0;
|
||||
phase.trim[i] = trim;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
StructField internalField;
|
||||
PhaseData & phase;
|
||||
int index;
|
||||
BoardEnum board;
|
||||
unsigned int version;
|
||||
int rotencCount;
|
||||
int trimBase[NUM_STICKS];
|
||||
int trimExt[NUM_STICKS];
|
||||
unsigned int trimMode[NUM_STICKS];
|
||||
};
|
||||
|
||||
class MixField: public TransformedField {
|
||||
public:
|
||||
MixField(MixData & mix, BoardEnum board, unsigned int version, ModelData * model):
|
||||
@@ -744,12 +839,14 @@ class MixField: public TransformedField {
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(_destCh));
|
||||
internalField.Append(new UnsignedField<16>(mix.phases));
|
||||
internalField.Append(new UnsignedField<8>((unsigned int &)mix.mltpx));
|
||||
internalField.Append(new UnsignedField<2>((unsigned int &)mix.mltpx));
|
||||
internalField.Append(new UnsignedField<1>((unsigned int &)mix.carryTrim));
|
||||
internalField.Append(new SpareBitsField<5>());
|
||||
internalField.Append(new SignedField<16>(_weight));
|
||||
internalField.Append(new SwitchField<8>(mix.swtch, board, version));
|
||||
internalField.Append(new CurveReferenceField(mix.curve, board, version));
|
||||
internalField.Append(new UnsignedField<4>(mix.mixWarn));
|
||||
internalField.Append(new UnsignedField<4>(mix.srcVariant));
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
internalField.Append(new UnsignedField<8>(mix.delayUp));
|
||||
internalField.Append(new UnsignedField<8>(mix.delayDown));
|
||||
internalField.Append(new UnsignedField<8>(mix.speedUp));
|
||||
@@ -759,6 +856,26 @@ class MixField: public TransformedField {
|
||||
internalField.Append(new ZCharField<8>(mix.name));
|
||||
internalField.Append(new SpareBitsField<8>());
|
||||
}
|
||||
else if (IS_ARM(board) && version >= 216) {
|
||||
internalField.Append(new UnsignedField<4>(_destCh));
|
||||
internalField.Append(new UnsignedField<4>(mix.mixWarn));
|
||||
internalField.Append(new UnsignedField<16>(mix.phases));
|
||||
internalField.Append(new BoolField<1>(_curveMode));
|
||||
internalField.Append(new BoolField<1>(mix.noExpo));
|
||||
internalField.Append(new SignedField<3>(mix.carryTrim));
|
||||
internalField.Append(new UnsignedField<2>((unsigned int &)mix.mltpx));
|
||||
internalField.Append(new SpareBitsField<1>());
|
||||
internalField.Append(new SignedField<16>(_weight));
|
||||
internalField.Append(new SwitchField<8>(mix.swtch, board, version));
|
||||
internalField.Append(new SignedField<8>(_curveParam));
|
||||
internalField.Append(new UnsignedField<8>(mix.delayUp));
|
||||
internalField.Append(new UnsignedField<8>(mix.delayDown));
|
||||
internalField.Append(new UnsignedField<8>(mix.speedUp));
|
||||
internalField.Append(new UnsignedField<8>(mix.speedDown));
|
||||
internalField.Append(new SourceField<8>(mix.srcRaw, board, version, FLAG_NOTELEMETRY));
|
||||
internalField.Append(new SignedField<16>(_offset));
|
||||
internalField.Append(new ZCharField<6>(mix.name));
|
||||
}
|
||||
else if (IS_ARM(board)) {
|
||||
internalField.Append(new UnsignedField<8>(_destCh));
|
||||
internalField.Append(new UnsignedField<16>(mix.phases));
|
||||
@@ -775,7 +892,7 @@ class MixField: public TransformedField {
|
||||
internalField.Append(new SignedField<8>(_curveParam));
|
||||
if (version >= 214) {
|
||||
internalField.Append(new UnsignedField<4>(mix.mixWarn));
|
||||
internalField.Append(new UnsignedField<4>(mix.srcVariant));
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
}
|
||||
else {
|
||||
internalField.Append(new UnsignedField<8>(mix.mixWarn));
|
||||
@@ -865,9 +982,9 @@ class MixField: public TransformedField {
|
||||
}
|
||||
|
||||
if (IS_ARM(board)) {
|
||||
exportGvarParam(mix.weight, _weight);
|
||||
exportGvarParam(mix.weight, _weight, version);
|
||||
if (version >= 214)
|
||||
exportGvarParam(mix.sOffset, _offset);
|
||||
exportGvarParam(mix.sOffset, _offset, version);
|
||||
else
|
||||
splitGvarParam(mix.sOffset, _offset, _offsetMode, board, version);
|
||||
}
|
||||
@@ -879,7 +996,7 @@ class MixField: public TransformedField {
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
if (IS_TARANIS(board) || version < 216) {
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
if (mix.srcRaw.type == SOURCE_TYPE_STICK && mix.srcRaw.index < NUM_STICKS) {
|
||||
if (!mix.noExpo) {
|
||||
mix.srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, mix.srcRaw.index, model);
|
||||
@@ -900,9 +1017,9 @@ class MixField: public TransformedField {
|
||||
}
|
||||
|
||||
if (IS_ARM(board)) {
|
||||
importGvarParam(mix.weight, _weight);
|
||||
importGvarParam(mix.weight, _weight, version);
|
||||
if (version >= 214)
|
||||
importGvarParam(mix.sOffset, _offset);
|
||||
importGvarParam(mix.sOffset, _offset, version);
|
||||
else
|
||||
concatGvarParam(mix.sOffset, _offset, _offsetMode, board, version);
|
||||
}
|
||||
@@ -910,6 +1027,13 @@ class MixField: public TransformedField {
|
||||
concatGvarParam(mix.weight, _weight, _weightMode, board, version);
|
||||
concatGvarParam(mix.sOffset, _offset, _offsetMode, board, version);
|
||||
}
|
||||
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
if (mix.sOffset >= -500 && mix.sOffset <= 500 && mix.weight >= -500 && mix.weight <= 500) {
|
||||
mix.sOffset = divRoundClosest(mix.sOffset * mix.weight, 100);
|
||||
}
|
||||
if (mix.carryTrim < 0) mix.carryTrim = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -938,17 +1062,28 @@ class InputField: public TransformedField {
|
||||
{
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
internalField.Append(new SourceField<8>(expo.srcRaw, board, version, 0));
|
||||
internalField.Append(new UnsignedField<16>(expo.scale));
|
||||
internalField.Append(new UnsignedField<16>(expo.scale, "Scale"));
|
||||
internalField.Append(new UnsignedField<8>(expo.chn, "Channel"));
|
||||
internalField.Append(new SwitchField<8>(expo.swtch, board, version));
|
||||
internalField.Append(new UnsignedField<16>(expo.phases));
|
||||
internalField.Append(new SignedField<8>(_weight, "Weight"));
|
||||
internalField.Append(new SignedField<8>(expo.carryTrim));
|
||||
internalField.Append(new SignedField<6>(expo.carryTrim, "CarryTrim"));
|
||||
internalField.Append(new UnsignedField<2>(expo.mode, "Mode"));
|
||||
internalField.Append(new ZCharField<8>(expo.name));
|
||||
internalField.Append(new SignedField<8>(expo.offset, "Offset"));
|
||||
internalField.Append(new CurveReferenceField(expo.curve, board, version));
|
||||
internalField.Append(new SpareBitsField<8>());
|
||||
}
|
||||
else if (IS_ARM(board) && version >= 216) {
|
||||
internalField.Append(new UnsignedField<2>(expo.mode, "Mode"));
|
||||
internalField.Append(new UnsignedField<4>(expo.chn, "Channel"));
|
||||
internalField.Append(new BoolField<2>(_curveMode));
|
||||
internalField.Append(new SwitchField<8>(expo.swtch, board, version));
|
||||
internalField.Append(new UnsignedField<16>(expo.phases, "Phases"));
|
||||
internalField.Append(new SignedField<8>(_weight, "Weight"));
|
||||
internalField.Append(new ZCharField<6>(expo.name));
|
||||
internalField.Append(new SignedField<8>(_curveParam));
|
||||
}
|
||||
else if (IS_ARM(board)) {
|
||||
internalField.Append(new UnsignedField<8>(expo.mode, "Mode"));
|
||||
internalField.Append(new UnsignedField<8>(expo.chn, "Channel"));
|
||||
@@ -1008,9 +1143,11 @@ class InputField: public TransformedField {
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
if (expo.mode) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
if (IS_TARANIS(board)) {
|
||||
if (version < 216) {
|
||||
if (expo.mode) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1041,7 +1178,7 @@ class LimitField: public StructField {
|
||||
LimitField(LimitData & limit, BoardEnum board, unsigned int version):
|
||||
StructField("Limit")
|
||||
{
|
||||
if (IS_ARM(board) && version >= 216) {
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
Append(new ConversionField< SignedField<16> >(limit.min, +1000));
|
||||
Append(new ConversionField< SignedField<16> >(limit.max, -1000));
|
||||
}
|
||||
@@ -1341,6 +1478,10 @@ class LogicalSwitchField: public TransformedField {
|
||||
}
|
||||
}
|
||||
|
||||
~LogicalSwitchField()
|
||||
{
|
||||
delete andswitchesConversionTable;
|
||||
}
|
||||
virtual void beforeExport()
|
||||
{
|
||||
if (csw.func == LS_FN_TIMER) {
|
||||
@@ -1458,7 +1599,7 @@ class CustomFunctionsConversionTable: public ConversionTable {
|
||||
int val=0;
|
||||
|
||||
if (version >= 216) {
|
||||
for (int i=0; i<32; i++) {
|
||||
for (int i=0; i<MAX_CHANNELS(board, version); i++) {
|
||||
addConversion(i, val);
|
||||
}
|
||||
val++;
|
||||
@@ -1618,11 +1759,11 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
internalField.Append(new CharField<6>(_param, false));
|
||||
|
||||
if (version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(_active));
|
||||
internalField.Append(new SignedField<8>(_active));
|
||||
}
|
||||
else if (version >= 214) {
|
||||
internalField.Append(new UnsignedField<2>(_mode));
|
||||
internalField.Append(new UnsignedField<6>(_active));
|
||||
internalField.Append(new UnsignedField<6>((unsigned int &)_active));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new UnsignedField<8>((unsigned int &)_active));
|
||||
@@ -1723,7 +1864,7 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
|
||||
if (fn.func >= FuncSafetyCh1 && fn.func <= FuncSafetyCh32) {
|
||||
fn.func = AssignFunc(fn.func + index);
|
||||
fn.param = (int)value;
|
||||
fn.param = (int8_t)value;
|
||||
}
|
||||
else if (fn.func >= FuncSetTimer1 && fn.func <= FuncSetTimer2) {
|
||||
fn.func = AssignFunc(fn.func + index);
|
||||
@@ -1783,7 +1924,7 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
CustomFunctionsConversionTable functionsConversionTable;
|
||||
SourcesConversionTable * sourcesConversionTable;
|
||||
char _param[10];
|
||||
unsigned int _active;
|
||||
int _active;
|
||||
unsigned int _mode;
|
||||
};
|
||||
|
||||
@@ -1808,7 +1949,7 @@ class AvrCustomFunctionField: public TransformedField {
|
||||
internalField.Append(new UnsignedField<5>(_union_param));
|
||||
internalField.Append(new UnsignedField<1>(_active));
|
||||
}
|
||||
if (version >= 213) {
|
||||
else if (version >= 213) {
|
||||
internalField.Append(new SwitchField<8>(fn.swtch, board, version));
|
||||
internalField.Append(new UnsignedField<3>(_union_param));
|
||||
internalField.Append(new ConversionField< UnsignedField<5> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
|
||||
@@ -2048,7 +2189,7 @@ class FrskyField: public StructField {
|
||||
rssiConversionTable[1] = RSSIConversionTable(1);
|
||||
|
||||
if (IS_ARM(board)) {
|
||||
for (int i=0; i<2; i++) {
|
||||
for (int i=0; i < ((version >= 216) ? 4 : 2); i++) {
|
||||
Append(new UnsignedField<8>(frsky.channels[i].ratio, "Ratio"));
|
||||
Append(new SignedField<12>(frsky.channels[i].offset, "Offset"));
|
||||
Append(new UnsignedField<4>(frsky.channels[i].type, "Type"));
|
||||
@@ -2069,7 +2210,7 @@ class FrskyField: public StructField {
|
||||
else {
|
||||
Append(new UnsignedField<8>(frsky.voltsSource));
|
||||
}
|
||||
Append(new UnsignedField<8>(frsky.blades));
|
||||
Append(new ConversionField< SignedField<8> >(frsky.blades, -2));
|
||||
Append(new UnsignedField<8>(frsky.currentSource));
|
||||
|
||||
Append(new UnsignedField<1>(frsky.screens[0].type));
|
||||
@@ -2111,12 +2252,12 @@ class FrskyField: public StructField {
|
||||
Append(new UnsignedField<1>(frsky.channels[i].alarms[j].greater));
|
||||
Append(new UnsignedField<2>(frsky.channels[i].multiplier, 0, 3, "Multiplier"));
|
||||
}
|
||||
Append(new UnsignedField<2>(frsky.usrProto));
|
||||
Append(new UnsignedField<2>(frsky.blades));
|
||||
Append(new UnsignedField<2>(frsky.usrProto, "USR Proto"));
|
||||
Append(new ConversionField< UnsignedField<2> >((unsigned int &)frsky.blades, -2));
|
||||
Append(new UnsignedField<1>(frsky.screens[0].type));
|
||||
Append(new UnsignedField<1>(frsky.screens[1].type));
|
||||
Append(new UnsignedField<2>(frsky.voltsSource));
|
||||
Append(new SignedField<4>(frsky.varioMin));
|
||||
Append(new UnsignedField<2>(frsky.voltsSource, "Volts Source"));
|
||||
Append(new SignedField<4>(frsky.varioMin, "Vario Min"));
|
||||
Append(new SignedField<4>(frsky.varioMax));
|
||||
for (int i=0; i<2; i++) {
|
||||
Append(new ConversionField< UnsignedField<2> >(frsky.rssiAlarms[i].level, &rssiConversionTable[i], "RSSI level"));
|
||||
@@ -2165,7 +2306,8 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
board(board),
|
||||
version(version),
|
||||
variant(variant),
|
||||
protocolsConversionTable(board)
|
||||
protocolsConversionTable(board),
|
||||
throttleSourceConversionTable(board, version)
|
||||
{
|
||||
sprintf(name, "Model %s", modelData.name);
|
||||
|
||||
@@ -2268,14 +2410,14 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
internalField.Append(new AvrCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
||||
}
|
||||
internalField.Append(new HeliField(modelData.swashRingData, board, version, variant));
|
||||
for (int i=0; i<MAX_PHASES(board, version); i++)
|
||||
internalField.Append(new PhaseField(modelData.phaseData[i], i, board, version));
|
||||
for (int i=0; i<MAX_FLIGHT_MODES(board, version); i++)
|
||||
internalField.Append(new FlightModeField(modelData.phaseData[i], i, board, version));
|
||||
|
||||
if (!IS_ARM(board) || version < 216) {
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
|
||||
}
|
||||
|
||||
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc));
|
||||
internalField.Append(new ConversionField< UnsignedField<8> >(modelData.thrTraceSrc, &throttleSourceConversionTable, "Throttle Source"));
|
||||
|
||||
if (!afterrelease21March2013) {
|
||||
internalField.Append(new UnsignedField<8>(modelData.modelId));
|
||||
@@ -2342,7 +2484,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
|
||||
if (board==BOARD_SKY9X && version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn));
|
||||
for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) {
|
||||
for (int i=0; i < GetCurrentFirmware()->getCapability(Pots); i++) {
|
||||
internalField.Append(new SignedField<8>(modelData.potPosition[i]));
|
||||
}
|
||||
}
|
||||
@@ -2366,7 +2508,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
internalField.Append(new ZCharField<4>(modelData.inputNames[i]));
|
||||
}
|
||||
internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn));
|
||||
for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) {
|
||||
for (int i=0; i < GetCurrentFirmware()->getCapability(Pots); i++) {
|
||||
internalField.Append(new SignedField<8>(modelData.potPosition[i]));
|
||||
}
|
||||
}
|
||||
@@ -2425,7 +2567,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
generalData(generalData),
|
||||
board(board),
|
||||
version(version),
|
||||
inputsCount(4 + MAX_POTS(board, version))
|
||||
inputsCount(4 + MAX_POTS(board))
|
||||
{
|
||||
generalData.version = version;
|
||||
generalData.variant = variant;
|
||||
@@ -2442,12 +2584,18 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i=0; i<inputsCount; i++)
|
||||
internalField.Append(new SignedField<16>(generalData.calibMid[i]));
|
||||
for (int i=0; i<inputsCount; i++)
|
||||
internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i]));
|
||||
for (int i=0; i<inputsCount; i++)
|
||||
internalField.Append(new SignedField<16>(generalData.calibSpanPos[i]));
|
||||
for (int i=0; i<inputsCount; i++) {
|
||||
if (!IS_TARANIS(board) || i!=6)
|
||||
internalField.Append(new SignedField<16>(generalData.calibMid[i]));
|
||||
}
|
||||
for (int i=0; i<inputsCount; i++) {
|
||||
if (!IS_TARANIS(board) || i!=6)
|
||||
internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i]));
|
||||
}
|
||||
for (int i=0; i<inputsCount; i++) {
|
||||
if (!IS_TARANIS(board) || i!=6)
|
||||
internalField.Append(new SignedField<16>(generalData.calibSpanPos[i]));
|
||||
}
|
||||
}
|
||||
|
||||
internalField.Append(new UnsignedField<16>(chkSum));
|
||||
@@ -2487,7 +2635,9 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
internalField.Append(new BoolField<1>(generalData.minuteBeep));
|
||||
internalField.Append(new BoolField<1>(generalData.preBeep));
|
||||
}
|
||||
if (version >= 213 || (!IS_ARM(board) && version >= 212))
|
||||
if (version >= 216 && IS_TARANIS(board))
|
||||
internalField.Append(new SignedField<3>(generalData.splashDuration));
|
||||
else if (version >= 213 || (!IS_ARM(board) && version >= 212))
|
||||
internalField.Append(new UnsignedField<3>(generalData.splashMode)); // TODO
|
||||
else
|
||||
internalField.Append(new SpareBitsField<3>());
|
||||
@@ -2498,7 +2648,15 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
internalField.Append(new UnsignedField<8>(generalData.templateSetup));
|
||||
internalField.Append(new SignedField<8>(generalData.PPM_Multiplier));
|
||||
internalField.Append(new SignedField<8>(generalData.hapticLength));
|
||||
internalField.Append(new UnsignedField<8>(generalData.reNavigation));
|
||||
|
||||
if (version < 216 || !IS_9X(board)) {
|
||||
internalField.Append(new UnsignedField<8>(generalData.reNavigation));
|
||||
}
|
||||
|
||||
if (version >= 216 && !IS_TARANIS(board)) {
|
||||
internalField.Append(new UnsignedField<4>(generalData.stickReverse));
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
}
|
||||
|
||||
internalField.Append(new SignedField<3>(generalData.beeperLength));
|
||||
internalField.Append(new UnsignedField<3>(generalData.hapticStrength));
|
||||
@@ -2549,9 +2707,10 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
}
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(generalData.hw_uartMode));
|
||||
for (int i=0; i<8; i++) {
|
||||
internalField.Append(new UnsignedField<1>(generalData.potsType[i]));
|
||||
for (int i=0; i<4; i++) {
|
||||
internalField.Append(new UnsignedField<2>(potsType[i]));
|
||||
}
|
||||
internalField.Append(new UnsignedField<8>(generalData.backlightColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2569,6 +2728,11 @@ void OpenTxGeneralData::beforeExport()
|
||||
sum += generalData.calibSpanPos[i];
|
||||
if (++count == 12) break;
|
||||
}
|
||||
for (int i=0; i<4; i++) {
|
||||
potsType[i] = generalData.potsType[i];
|
||||
if (i<2 && potsType[i] == 1)
|
||||
potsType[i] = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i=0; i<inputsCount; i++)
|
||||
@@ -2581,4 +2745,8 @@ void OpenTxGeneralData::beforeExport()
|
||||
|
||||
void OpenTxGeneralData::afterImport()
|
||||
{
|
||||
for (int i=0; i<4; i++) {
|
||||
if (i<2 && generalData.potsType[i] == 0)
|
||||
generalData.potsType[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define SIMU_M128_VARIANTS (M128_VARIANT|SIMU_STOCK_VARIANTS)
|
||||
|
||||
#define O9X_MAX_TIMERS 2
|
||||
#define O9X_MAX_PHASES 5
|
||||
#define O9X_MAX_FLIGHT_MODES 5
|
||||
#define O9X_MAX_MIXERS 32
|
||||
#define O9X_MAX_EXPOS 14
|
||||
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -41,7 +41,7 @@
|
||||
#define O9X_MAX_CURVES 8
|
||||
#define O9X_NUM_POINTS (112-O9X_MAX_CURVES)
|
||||
|
||||
#define O9X_ARM_MAX_PHASES 9
|
||||
#define O9X_ARM_MAX_FLIGHT_MODES 9
|
||||
#define O9X_ARM_MAX_MIXERS 64
|
||||
#define O9X_ARM_MAX_EXPOS 32
|
||||
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
|
||||
@@ -65,6 +65,7 @@ class OpenTxGeneralData: public TransformedField {
|
||||
unsigned int version;
|
||||
int inputsCount;
|
||||
unsigned int chkSum;
|
||||
unsigned int potsType[4];
|
||||
};
|
||||
|
||||
class ProtocolsConversionTable: public ConversionTable
|
||||
@@ -102,6 +103,12 @@ class ProtocolsConversionTable: public ConversionTable
|
||||
}
|
||||
};
|
||||
|
||||
class ThrottleSourceConversionTable: public ConversionTable {
|
||||
|
||||
public:
|
||||
ThrottleSourceConversionTable(BoardEnum board, unsigned int version);
|
||||
};
|
||||
|
||||
class ChannelsConversionTable: public ConversionTable
|
||||
{
|
||||
public:
|
||||
@@ -133,7 +140,9 @@ class OpenTxModelData: public TransformedField {
|
||||
char name[256];
|
||||
int subprotocols[C9X_NUM_MODULES+1/*trainer*/];
|
||||
ProtocolsConversionTable protocolsConversionTable;
|
||||
ThrottleSourceConversionTable throttleSourceConversionTable;
|
||||
ChannelsConversionTable channelsConversionTable;
|
||||
};
|
||||
|
||||
void OpenTxEepromCleanup(void);
|
||||
#endif
|
||||
|
||||
@@ -43,18 +43,18 @@ size_t SizeOfArray( T(&)[ N ] )
|
||||
return N;
|
||||
}
|
||||
|
||||
OpenTxInterface::OpenTxInterface(BoardEnum board):
|
||||
OpenTxEepromInterface::OpenTxEepromInterface(BoardEnum board):
|
||||
EEPROMInterface(board),
|
||||
efile(new EFile())
|
||||
{
|
||||
}
|
||||
|
||||
OpenTxInterface::~OpenTxInterface()
|
||||
OpenTxEepromInterface::~OpenTxEepromInterface()
|
||||
{
|
||||
delete efile;
|
||||
}
|
||||
|
||||
const char * OpenTxInterface::getName()
|
||||
const char * OpenTxEepromInterface::getName()
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -65,6 +65,8 @@ const char * OpenTxInterface::getName()
|
||||
return "OpenTX for Gruvin9x board / 9X";
|
||||
case BOARD_TARANIS:
|
||||
return "OpenTX for FrSky Taranis";
|
||||
case BOARD_TARANIS_PLUS:
|
||||
return "OpenTX for FrSky Taranis Plus";
|
||||
case BOARD_TARANIS_REV4a:
|
||||
return "OpenTX for FrSky Taranis Rev4a";
|
||||
case BOARD_SKY9X:
|
||||
@@ -76,7 +78,7 @@ const char * OpenTxInterface::getName()
|
||||
}
|
||||
}
|
||||
|
||||
const int OpenTxInterface::getEEpromSize()
|
||||
const int OpenTxEepromInterface::getEEpromSize()
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -90,6 +92,7 @@ const int OpenTxInterface::getEEpromSize()
|
||||
case BOARD_9XRPRO:
|
||||
return EESIZE_9XRPRO;
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
return EESIZE_TARANIS;
|
||||
case BOARD_TARANIS_REV4a:
|
||||
return EESIZE_TARANIS_REV4a;
|
||||
@@ -98,7 +101,7 @@ const int OpenTxInterface::getEEpromSize()
|
||||
}
|
||||
}
|
||||
|
||||
const int OpenTxInterface::getMaxModels()
|
||||
const int OpenTxEepromInterface::getMaxModels()
|
||||
{
|
||||
if (IS_ARM(board))
|
||||
return 60;
|
||||
@@ -111,7 +114,7 @@ const int OpenTxInterface::getMaxModels()
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool OpenTxInterface::loadModel(ModelData &model, uint8_t *data, int index, unsigned int stickMode)
|
||||
bool OpenTxEepromInterface::loadModel(ModelData &model, uint8_t *data, int index, unsigned int stickMode)
|
||||
{
|
||||
T _model;
|
||||
|
||||
@@ -144,7 +147,7 @@ bool OpenTxInterface::loadModel(ModelData &model, uint8_t *data, int index, unsi
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool OpenTxInterface::loadModelVariant(unsigned int index, ModelData &model, uint8_t *data, unsigned int version, unsigned int variant)
|
||||
bool OpenTxEepromInterface::loadModelVariant(unsigned int index, ModelData &model, uint8_t *data, unsigned int version, unsigned int variant)
|
||||
{
|
||||
T open9xModel(model, board, version, variant);
|
||||
|
||||
@@ -171,7 +174,7 @@ bool OpenTxInterface::loadModelVariant(unsigned int index, ModelData &model, uin
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenTxInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data, int index, unsigned int variant, unsigned int stickMode)
|
||||
bool OpenTxEepromInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data, int index, unsigned int variant, unsigned int stickMode)
|
||||
{
|
||||
if (version == 201) {
|
||||
return loadModel<Open9xModelData_v201>(model, data, index, stickMode);
|
||||
@@ -252,7 +255,7 @@ bool OpenTxInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool OpenTxInterface::loadGeneral(GeneralSettings &settings, unsigned int version)
|
||||
bool OpenTxEepromInterface::loadGeneral(GeneralSettings &settings, unsigned int version)
|
||||
{
|
||||
QByteArray eepromData(sizeof(settings), 0); // GeneralSettings should be always bigger than the EEPROM struct
|
||||
T open9xSettings(settings, board, version);
|
||||
@@ -268,7 +271,7 @@ bool OpenTxInterface::loadGeneral(GeneralSettings &settings, unsigned int versio
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool OpenTxInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, uint32_t version, uint32_t variant)
|
||||
bool OpenTxEepromInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, uint32_t version, uint32_t variant)
|
||||
{
|
||||
T open9xSettings(settings, board, version, variant);
|
||||
// open9xSettings.Dump();
|
||||
@@ -279,7 +282,7 @@ bool OpenTxInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, ui
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool OpenTxInterface::saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant)
|
||||
bool OpenTxEepromInterface::saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant)
|
||||
{
|
||||
T open9xModel(model, board, version, variant);
|
||||
// open9xModel.Dump();
|
||||
@@ -289,12 +292,12 @@ bool OpenTxInterface::saveModel(unsigned int index, ModelData &model, unsigned i
|
||||
return (sz == eeprom.size());
|
||||
}
|
||||
|
||||
bool OpenTxInterface::loadxml(RadioData &radioData, QDomDocument &doc)
|
||||
bool OpenTxEepromInterface::loadxml(RadioData &radioData, QDomDocument &doc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OpenTxInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
|
||||
bool OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
|
||||
{
|
||||
std::cout << "trying " << getName() << " import...";
|
||||
|
||||
@@ -356,21 +359,21 @@ bool OpenTxInterface::load(RadioData &radioData, const uint8_t *eeprom, int size
|
||||
return true;
|
||||
}
|
||||
|
||||
int OpenTxInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
|
||||
int OpenTxEepromInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
|
||||
{
|
||||
EEPROMWarnings.clear();
|
||||
|
||||
if (!version) {
|
||||
switch(board) {
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
case BOARD_SKY9X:
|
||||
version = 216;
|
||||
break;
|
||||
case BOARD_9XRPRO:
|
||||
version = 216;
|
||||
break;
|
||||
case BOARD_GRUVIN9X:
|
||||
case BOARD_MEGA2560:
|
||||
version = 216;
|
||||
break;
|
||||
case BOARD_M128:
|
||||
@@ -412,7 +415,7 @@ int OpenTxInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian
|
||||
return size;
|
||||
}
|
||||
|
||||
int OpenTxInterface::getSize(ModelData &model)
|
||||
int OpenTxEepromInterface::getSize(ModelData &model)
|
||||
{
|
||||
if (IS_SKY9X(board))
|
||||
return 0;
|
||||
@@ -435,7 +438,7 @@ int OpenTxInterface::getSize(ModelData &model)
|
||||
return efile->size(0);
|
||||
}
|
||||
|
||||
int OpenTxInterface::getSize(GeneralSettings &settings)
|
||||
int OpenTxEepromInterface::getSize(GeneralSettings &settings)
|
||||
{
|
||||
if (IS_SKY9X(board))
|
||||
return 0;
|
||||
@@ -455,11 +458,9 @@ int OpenTxInterface::getSize(GeneralSettings &settings)
|
||||
return efile->size(0);
|
||||
}
|
||||
|
||||
int OpenTxInterface::getCapability(const Capability capability)
|
||||
int OpenTxFirmware::getCapability(const Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case OwnerName:
|
||||
return 0;
|
||||
case ModelImage:
|
||||
if (IS_TARANIS(board))
|
||||
return 1;
|
||||
@@ -486,25 +487,28 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
return 1;
|
||||
case PPMFrameLength:
|
||||
return 40;
|
||||
case FlightPhases:
|
||||
case FlightModes:
|
||||
if (IS_ARM(board))
|
||||
return 9;
|
||||
else if (board==BOARD_GRUVIN9X)
|
||||
return 6;
|
||||
else
|
||||
return 5;
|
||||
case FlightPhasesHaveFades:
|
||||
case FlightModesHaveFades:
|
||||
return 1;
|
||||
case Gvars:
|
||||
return IS_ARM(board) ? 9 : 5;
|
||||
case FlightModesName:
|
||||
case GvarsName:
|
||||
return (IS_TARANIS(board) ? 10 : 6);
|
||||
case GvarsName:
|
||||
return 6;
|
||||
case HasChNames:
|
||||
return (IS_TARANIS(board) ? 1 : 0);
|
||||
case GvarsInCS:
|
||||
case HasFAIMode:
|
||||
return 1;
|
||||
case GvarsAreNamed:
|
||||
case GvarsFlightPhases:
|
||||
case GvarsFlightModes:
|
||||
return ((IS_ARM(board)||(board==BOARD_GRUVIN9X)) ? 1 : 0);
|
||||
case Mixes:
|
||||
return (IS_ARM(board) ? O9X_ARM_MAX_MIXERS : O9X_MAX_MIXERS);
|
||||
@@ -564,10 +568,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case SoundPitch:
|
||||
return 1;
|
||||
case Haptic:
|
||||
if (IS_TARANIS(board))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
return 1;
|
||||
case ModelTrainerEnable:
|
||||
if (IS_TARANIS(board))
|
||||
return 1;
|
||||
@@ -576,20 +577,12 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case HasFuncRepeat:
|
||||
case HasContrast:
|
||||
return 1;
|
||||
case HapticLength:
|
||||
case HapticMode:
|
||||
if (IS_TARANIS(board))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
case Beeperlen:
|
||||
return 1;
|
||||
case MaxVolume:
|
||||
return (IS_ARM(board) ? 23 : 7);
|
||||
case HasSoundMixer:
|
||||
return (IS_ARM(board) ? 1 : 0);
|
||||
case ExtraChannels:
|
||||
return 0;
|
||||
case ExtraInputs:
|
||||
return 1;
|
||||
case ExtendedTrims:
|
||||
@@ -601,7 +594,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case MixesWithoutExpo:
|
||||
return 1;
|
||||
case NumCurves:
|
||||
return (IS_ARM(board) ? 16 : 8);
|
||||
return (IS_TARANIS(board) ? 32 : (IS_ARM(board) ? 16 : 8));
|
||||
case HasMixerNames:
|
||||
return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : false);
|
||||
case HasExpoNames:
|
||||
@@ -626,8 +619,6 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
return 1;
|
||||
case TelemetryRSSIModel:
|
||||
return 1;
|
||||
case TelemetryAlarm:
|
||||
return 0;
|
||||
case TelemetryTimeshift:
|
||||
return 1;
|
||||
case TelemetryMaxMultiplier:
|
||||
@@ -674,7 +665,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case LCDWidth:
|
||||
return (IS_TARANIS(board) ? 212 : 128) ;
|
||||
case GetThrSwitch:
|
||||
return (IS_TARANIS(board) ? DSW_SF1 : DSW_THR) ;
|
||||
return (IS_TARANIS(board) ? SWITCH_SF1 : SWITCH_THR) ;
|
||||
case HasDisplayText:
|
||||
case VirtualInputs:
|
||||
return IS_TARANIS(board) ? 32 : 0;
|
||||
@@ -683,8 +674,6 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case LuaInputs:
|
||||
case LimitsPer1000:
|
||||
case EnhancedCurves:
|
||||
case TelemetryInternalAlarms:
|
||||
return IS_TARANIS(board);
|
||||
case HasFasOffset:
|
||||
return (IS_STOCK(board) ? false : true);
|
||||
case HasMahPersistent:
|
||||
@@ -705,7 +694,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
}
|
||||
}
|
||||
|
||||
int OpenTxInterface::isAvailable(Protocol proto, int port)
|
||||
int OpenTxEepromInterface::isAvailable(Protocol proto, int port)
|
||||
{
|
||||
if (IS_TARANIS(board)) {
|
||||
switch (port) {
|
||||
@@ -727,7 +716,7 @@ int OpenTxInterface::isAvailable(Protocol proto, int port)
|
||||
case PXX_XJT_X16:
|
||||
case PXX_XJT_D8:
|
||||
case PXX_XJT_LR12:
|
||||
case PXX_DJT:
|
||||
//case PXX_DJT: // Unavailable for now
|
||||
case LP45:
|
||||
case DSM2:
|
||||
case DSMX:
|
||||
@@ -790,33 +779,12 @@ int OpenTxInterface::isAvailable(Protocol proto, int port)
|
||||
}
|
||||
}
|
||||
|
||||
SimulatorInterface * OpenTxInterface::getSimulator()
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
return new Open9xSimulator(this);
|
||||
case BOARD_M128:
|
||||
return new Open9xM128Simulator(this);
|
||||
case BOARD_GRUVIN9X:
|
||||
return new Open9xGruvin9xSimulator(this);
|
||||
case BOARD_SKY9X:
|
||||
return new Open9xSky9xSimulator(this);
|
||||
case BOARD_9XRPRO:
|
||||
return new Open9xSky9xSimulator(this);
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
return new OpentxTaranisSimulator(this);
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, size_t SIZE>
|
||||
size_t getSizeA(T (&)[SIZE]) {
|
||||
return SIZE;
|
||||
}
|
||||
|
||||
bool OpenTxInterface::checkVersion(unsigned int version)
|
||||
bool OpenTxEepromInterface::checkVersion(unsigned int version)
|
||||
{
|
||||
switch(version) {
|
||||
case 201:
|
||||
@@ -841,7 +809,7 @@ bool OpenTxInterface::checkVersion(unsigned int version)
|
||||
break;
|
||||
// case 206:
|
||||
case 207:
|
||||
// V4: Rotary Encoders position in FlightPhases
|
||||
// V4: Rotary Encoders position in FlightModes
|
||||
break;
|
||||
case 208:
|
||||
// Trim value in 16bits
|
||||
@@ -882,7 +850,7 @@ bool OpenTxInterface::checkVersion(unsigned int version)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenTxInterface::checkVariant(unsigned int version, unsigned int variant)
|
||||
bool OpenTxEepromInterface::checkVariant(unsigned int version, unsigned int variant)
|
||||
{
|
||||
if (board == BOARD_M128 && !(variant & 0x8000)) {
|
||||
if (version == 212) {
|
||||
@@ -904,7 +872,7 @@ bool OpenTxInterface::checkVariant(unsigned int version, unsigned int variant)
|
||||
}
|
||||
}
|
||||
|
||||
bool OpenTxInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
|
||||
bool OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
|
||||
{
|
||||
std::cout << "trying " << getName() << " backup import...";
|
||||
|
||||
@@ -945,33 +913,61 @@ bool OpenTxInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esiz
|
||||
return true;
|
||||
}
|
||||
|
||||
QString geturl( int board)
|
||||
QString OpenTxFirmware::getFirmwareUrl(QString & id)
|
||||
{
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
case BOARD_GRUVIN9X:
|
||||
url.append("/getfw.php?fw=%1.hex");
|
||||
break;
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
url.append("/getfw.php?fw=%1.bin");
|
||||
break;
|
||||
default:
|
||||
url.clear();
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url = OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
case BOARD_GRUVIN9X:
|
||||
url.append(QString("/getfw.php?fw=%1.hex").arg(id));
|
||||
break;
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
url.append(QString("/getfw.php?fw=%1.bin").arg(id));
|
||||
break;
|
||||
default:
|
||||
url.clear();
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
QString getstamp( int board)
|
||||
QString OpenTxFirmware::getReleaseNotesUrl()
|
||||
{
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url = OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
url.append("/releasenotes-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
case BOARD_GRUVIN9X:
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_9XRPRO:
|
||||
url.append("9x.txt");
|
||||
break;
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
url.append("taranis.txt");
|
||||
break;
|
||||
default:
|
||||
url.clear();
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
QString OpenTxFirmware::getStampUrl()
|
||||
{
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
@@ -989,11 +985,12 @@ QString getstamp( int board)
|
||||
case BOARD_GRUVIN9X:
|
||||
url.append("gruvin9x.txt");
|
||||
break;
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_9XRPRO:
|
||||
url.append("sky9x.txt");
|
||||
break;
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
url.append("taranis.txt");
|
||||
break;
|
||||
@@ -1004,272 +1001,307 @@ QString getstamp( int board)
|
||||
return url;
|
||||
}
|
||||
|
||||
QString getrnurl( int board)
|
||||
SimulatorInterface * OpenTxFirmware::getSimulator()
|
||||
{
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
url.append("/releasenotes-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
case BOARD_GRUVIN9X:
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_SKY9X:
|
||||
url.append("9x.txt");
|
||||
break;
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
url.append("taranis.txt");
|
||||
break;
|
||||
default:
|
||||
url.clear();
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
return new Open9xSimulator();
|
||||
case BOARD_M128:
|
||||
return new Open9xM128Simulator();
|
||||
case BOARD_GRUVIN9X:
|
||||
return new Open9xGruvin9xSimulator();
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_9XRPRO:
|
||||
return new Open9xSky9xSimulator();
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_REV4a:
|
||||
return new OpentxTaranisSimulator();
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterOpen9xFirmwares()
|
||||
void registerOpenTxFirmwares()
|
||||
{
|
||||
Open9xFirmware * open9x;
|
||||
OpenTxFirmware * openTx;
|
||||
|
||||
Option ext_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "telemetrez", QObject::tr("Support for telemetry easy board"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } };
|
||||
Option nav_options[] = { { "rotenc", QObject::tr("Rotary Encoder use in menus navigation") }, { "potscroll", QObject::tr("Pots use in menus navigation") }, { NULL } };
|
||||
Option extr_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } };
|
||||
Option fai_options[] = { { "faichoice", QObject::tr("Possibility to enable FAI MODE at field") }, { "faimode", QObject::tr("FAI MODE always enabled") }, { NULL } };
|
||||
|
||||
/* 9x board */
|
||||
open9x = new Open9xFirmware("opentx-9x", QObject::tr("OpenTX for 9X board"), new OpenTxInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK), getrnurl(BOARD_STOCK), false);
|
||||
open9x->addOptions(ext_options);
|
||||
open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
open9x->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
open9x->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED open9x->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
open9x->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOptions(nav_options);
|
||||
open9x->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
open9x->addOption("pgbar", QObject::tr("EEprom write progress bar"));
|
||||
open9x->addOption("imperial", QObject::tr("Imperial units"));
|
||||
open9x->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
open9x->addOption("novario", QObject::tr("No vario support"));
|
||||
open9x->addOption("nogps", QObject::tr("No GPS support"));
|
||||
open9x->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
open9x->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-9x", QObject::tr("OpenTX for 9X board"), BOARD_STOCK, false);
|
||||
openTx->addOptions(ext_options);
|
||||
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOptions(nav_options);
|
||||
openTx->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
openTx->addOption("pgbar", QObject::tr("EEprom write progress bar"));
|
||||
openTx->addOption("imperial", QObject::tr("Imperial units"));
|
||||
openTx->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
openTx->addOption("novario", QObject::tr("No vario support"));
|
||||
openTx->addOption("nogps", QObject::tr("No GPS support"));
|
||||
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
openTx->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
|
||||
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* 9x board with M128 chip */
|
||||
open9x = new Open9xFirmware("opentx-9x128", QObject::tr("OpenTX for M128 / 9X board"), new OpenTxInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false);
|
||||
open9x->addOptions(ext_options);
|
||||
open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
open9x->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
open9x->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED open9x->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
open9x->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOptions(nav_options);
|
||||
open9x->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
open9x->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
open9x->addOption("imperial", QObject::tr("Imperial units"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-9x128", QObject::tr("OpenTX for M128 / 9X board"), BOARD_M128, false);
|
||||
openTx->addOptions(ext_options);
|
||||
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOptions(nav_options);
|
||||
openTx->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
openTx->addOption("imperial", QObject::tr("Imperial units"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* 9XR board */
|
||||
open9x = new Open9xFirmware("opentx-9xr", QObject::tr("OpenTX for 9XR"), new OpenTxInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK),getrnurl(BOARD_STOCK), false);
|
||||
open9x->addOptions(extr_options);
|
||||
open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
open9x->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
open9x->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED open9x->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
open9x->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
open9x->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
open9x->addOption("imperial", QObject::tr("Imperial units"));
|
||||
open9x->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
open9x->addOption("novario", QObject::tr("No vario support"));
|
||||
open9x->addOption("nogps", QObject::tr("No GPS support"));
|
||||
open9x->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-9xr", QObject::tr("OpenTX for 9XR"), BOARD_STOCK, false);
|
||||
openTx->addOptions(extr_options);
|
||||
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
openTx->addOption("imperial", QObject::tr("Imperial units"));
|
||||
openTx->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
openTx->addOption("novario", QObject::tr("No vario support"));
|
||||
openTx->addOption("nogps", QObject::tr("No GPS support"));
|
||||
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* 9XR board with M128 chip */
|
||||
open9x = new Open9xFirmware("opentx-9xr128", QObject::tr("OpenTX for 9XR with M128 chip"), new OpenTxInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false);
|
||||
open9x->addOptions(extr_options);
|
||||
open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
open9x->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
open9x->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED open9x->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
open9x->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
open9x->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
open9x->addOption("imperial", QObject::tr("Imperial units"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-9xr128", QObject::tr("OpenTX for 9XR with M128 chip"), BOARD_M128, false);
|
||||
openTx->addOptions(extr_options);
|
||||
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
openTx->addOption("imperial", QObject::tr("Imperial units"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* Gruvin9x board */
|
||||
open9x = new Open9xFirmware("opentx-gruvin9x", QObject::tr("OpenTX for Gruvin9x board / 9X"), new OpenTxInterface(BOARD_GRUVIN9X), geturl(BOARD_GRUVIN9X), getstamp(BOARD_GRUVIN9X),getrnurl(BOARD_GRUVIN9X), false);
|
||||
open9x->setVariantBase(FRSKY_VARIANT);
|
||||
open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("sdcard", QObject::tr("Support for SD memory card"));
|
||||
open9x->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
open9x->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
openTx = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("OpenTX for Gruvin9x board / 9X"), BOARD_GRUVIN9X, false);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("sdcard", QObject::tr("Support for SD memory card"));
|
||||
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } };
|
||||
open9x->addOptions(dsm2_options);
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
open9x->addOption("imperial", QObject::tr("Imperial units"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx->addOptions(dsm2_options);
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
openTx->addOption("imperial", QObject::tr("Imperial units"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
#ifndef __APPLE__
|
||||
/* SKY9X board */
|
||||
open9x = new Open9xFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), new OpenTxInterface(BOARD_SKY9X), geturl(BOARD_SKY9X), getstamp(BOARD_SKY9X),getrnurl(BOARD_SKY9X), true);
|
||||
open9x->setVariantBase(FRSKY_VARIANT);
|
||||
open9x->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
open9x->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), BOARD_SKY9X, true);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* SKY9X board */
|
||||
open9x = new Open9xFirmware("opentx-9xrpro", QObject::tr("openTx for 9XR-PRO"), new Open9xInterface(BOARD_9XRPRO), geturl(BOARD_9XRPRO), getstamp(BOARD_9XRPRO),getrnurl(BOARD_9XRPRO), true);
|
||||
open9x->setVariantBase(FRSKY_VARIANT);
|
||||
open9x->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
open9x->addOption("nofp", QObject::tr("No flight modes"));
|
||||
open9x->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
open9x->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
open9x->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
open9x->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
open9x->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
open9x->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
open9x->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
open9x->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
open9x->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
open9x->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
open9x->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-9xrpro", QObject::tr("OpenTX for 9XR-PRO"), BOARD_9XRPRO, true);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving some of them"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving some of them"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
openTx = new OpenTxFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), BOARD_SKY9X, true);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
#endif
|
||||
|
||||
/* Taranis board */
|
||||
open9x = new Open9xFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), new OpenTxInterface(BOARD_TARANIS), geturl(BOARD_TARANIS), getstamp(BOARD_TARANIS),getrnurl(BOARD_TARANIS), true);
|
||||
open9x->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
open9x->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
open9x->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), BOARD_TARANIS, true);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("haptic", QObject::tr("Haptic module installed"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* Taranis Plus board */
|
||||
openTx = new OpenTxFirmware("opentx-taranisplus", QObject::tr("OpenTX for FrSky Taranis Plus"), BOARD_TARANIS_PLUS, true);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
if (g.rev4aSupport()) {
|
||||
open9x = new Open9xFirmware("opentx-taranisrev4a", QObject::tr("OpenTX for FrSky Taranis Rev4a"), new OpenTxInterface(BOARD_TARANIS_REV4a), geturl(BOARD_TARANIS_REV4a), getstamp(BOARD_TARANIS_REV4a),getrnurl(BOARD_TARANIS), true);
|
||||
open9x->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
open9x->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
open9x->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
open9x->addOption("ppmus", QObject::tr("PPM values displayed in us"));
|
||||
open9x->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
openTx = new OpenTxFirmware("opentx-taranisrev4a", QObject::tr("OpenTX for FrSky Taranis Rev4a"), BOARD_TARANIS_REV4a, true);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("haptic", QObject::tr("Haptic module installed"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
}
|
||||
|
||||
default_firmware_variant = GetFirmwareVariant("opentx-9x-heli-templates-en");
|
||||
current_firmware_variant = default_firmware_variant;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
|
||||
class EFile;
|
||||
|
||||
class OpenTxInterface : public EEPROMInterface
|
||||
class OpenTxEepromInterface : public EEPROMInterface
|
||||
{
|
||||
public:
|
||||
|
||||
OpenTxInterface(BoardEnum board);
|
||||
OpenTxEepromInterface(BoardEnum board);
|
||||
|
||||
virtual ~OpenTxInterface();
|
||||
virtual ~OpenTxEepromInterface();
|
||||
|
||||
virtual const char * getName();
|
||||
|
||||
@@ -49,12 +49,8 @@ class OpenTxInterface : public EEPROMInterface
|
||||
|
||||
virtual int getSize(GeneralSettings &);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual int isAvailable(Protocol proto, int port=0);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
protected:
|
||||
|
||||
bool checkVersion(unsigned int version);
|
||||
@@ -82,10 +78,10 @@ class OpenTxInterface : public EEPROMInterface
|
||||
|
||||
};
|
||||
|
||||
class Open9xFirmware: public FirmwareInfo {
|
||||
class OpenTxFirmware: public FirmwareInterface {
|
||||
public:
|
||||
Open9xFirmware(const QString & id, const QString & name, EEPROMInterface * eepromInterface, const QString & url = QString(), const QString & stamp = QString(), const QString & rnurl = QString(), bool voice = false):
|
||||
FirmwareInfo(id, name, eepromInterface, url, stamp, rnurl, voice)
|
||||
OpenTxFirmware(const QString & id, const QString & name, const BoardEnum board, bool voice = false):
|
||||
FirmwareInterface(id, name, board, new OpenTxEepromInterface(board), voice)
|
||||
{
|
||||
addLanguage("en");
|
||||
addLanguage("fr");
|
||||
@@ -109,61 +105,19 @@ class Open9xFirmware: public FirmwareInfo {
|
||||
addTTSLanguage("es");
|
||||
}
|
||||
|
||||
virtual unsigned int getEepromVersion(unsigned int revision) {
|
||||
switch(this->eepromInterface->getBoard()) {
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_SKY9X:
|
||||
if (revision == 0)
|
||||
return 212;
|
||||
if (revision >= 1217)
|
||||
return 212;
|
||||
if (revision >= 1174)
|
||||
return 211;
|
||||
if (revision >= 1031)
|
||||
return 210;
|
||||
if (revision >= 791)
|
||||
return 209;
|
||||
if (revision >= 641)
|
||||
return 208;
|
||||
break;
|
||||
case BOARD_GRUVIN9X:
|
||||
if (revision == 0)
|
||||
return 211;
|
||||
if (revision >= 1217)
|
||||
return 211;
|
||||
if (revision >= 1174)
|
||||
return 210;
|
||||
if (revision >= 791)
|
||||
return 209;
|
||||
if (revision >= 641)
|
||||
return 208;
|
||||
if (revision >= 547)
|
||||
return 207;
|
||||
break;
|
||||
default:
|
||||
if (revision == 0)
|
||||
return 211;
|
||||
if (revision >= 1217)
|
||||
return 211;
|
||||
if (revision >= 1174)
|
||||
return 210;
|
||||
if (revision >= 791)
|
||||
return 209;
|
||||
if (revision >= 641)
|
||||
return 208;
|
||||
break;
|
||||
}
|
||||
if (revision >= 321)
|
||||
return 205;
|
||||
else if (revision >= 217)
|
||||
return 204;
|
||||
else if (revision >= 184)
|
||||
return 203;
|
||||
else
|
||||
return 202;
|
||||
}
|
||||
virtual QString getStampUrl();
|
||||
|
||||
virtual QString getReleaseNotesUrl();
|
||||
|
||||
virtual QString getFirmwareUrl(QString & id);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
|
||||
};
|
||||
|
||||
void RegisterOpen9xFirmwares();
|
||||
void registerOpenTxFirmwares();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,10 +49,13 @@
|
||||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
|
||||
#define GAUGES
|
||||
|
||||
#define NUM_POTS 3
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
@@ -78,6 +81,7 @@ namespace Open9x {
|
||||
#include "radio/src/telemetry/frsky.cpp"
|
||||
#include "radio/src/templates.cpp"
|
||||
#include "radio/src/translations.cpp"
|
||||
#include "radio/src/fonts.cpp"
|
||||
#include "radio/src/targets/stock/voice.cpp"
|
||||
#include "radio/src/buzzer.cpp"
|
||||
#include "radio/src/translations/tts_en.cpp"
|
||||
@@ -107,8 +111,7 @@ uint8_t getStickMode()
|
||||
|
||||
using namespace Open9x;
|
||||
|
||||
Open9xSimulator::Open9xSimulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
Open9xSimulator::Open9xSimulator()
|
||||
{
|
||||
#define INIT_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
@@ -141,7 +144,6 @@ void Open9xSimulator::start(QByteArray & eeprom, bool tests)
|
||||
|
||||
void Open9xSimulator::start(const char * filename, bool tests)
|
||||
{
|
||||
// open9xInterface->save(&Open9x::eeprom[0], radioData, SIMU_STOCK_VARIANTS);
|
||||
StartEepromThread(filename);
|
||||
StartMainThread(tests);
|
||||
}
|
||||
@@ -195,6 +197,13 @@ unsigned int Open9xSimulator::getPhase()
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xSimulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xSimulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class OpenTxInterface;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xSimulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xSimulator(OpenTxInterface *);
|
||||
Open9xSimulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -49,14 +49,12 @@ class Open9xSimulator : public SimulatorInterface {
|
||||
|
||||
virtual unsigned int getPhase();
|
||||
|
||||
virtual const char * getPhaseName(unsigned int phase);
|
||||
|
||||
virtual void wheelEvent(uint8_t steps) { }
|
||||
|
||||
virtual const char * getError();
|
||||
|
||||
protected:
|
||||
|
||||
OpenTxInterface * open9xInterface;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -140,51 +140,6 @@ int Th9xInterface::getSize(GeneralSettings &settings)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Th9xInterface::getCapability(const Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case Mixes:
|
||||
return TH9X_MAX_MIXERS;
|
||||
case OwnerName:
|
||||
return 0;
|
||||
case Timers:
|
||||
return 1;
|
||||
case Pots:
|
||||
return 3;
|
||||
case Switches:
|
||||
return 7;
|
||||
case SwitchesPositions:
|
||||
return 9;
|
||||
case CustomFunctions:
|
||||
return 0;
|
||||
case LogicalSwitches:
|
||||
return TH9X_MAX_SWITCHES;
|
||||
case Outputs:
|
||||
return 8;
|
||||
case ExtraChannels:
|
||||
return 4;
|
||||
case OffsetWeight:
|
||||
return 125;
|
||||
case Simulation:
|
||||
return 1;
|
||||
case HasContrast:
|
||||
case HasInputFilter:
|
||||
return 1;
|
||||
case CSFunc:
|
||||
return 13;
|
||||
case SlowScale:
|
||||
return 1;
|
||||
case SlowRange:
|
||||
return 10;
|
||||
case LCDWidth:
|
||||
return 128;
|
||||
case GetThrSwitch:
|
||||
return DSW_THR;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int Th9xInterface::isAvailable(Protocol proto, int port)
|
||||
{
|
||||
switch (proto) {
|
||||
@@ -198,9 +153,3 @@ int Th9xInterface::isAvailable(Protocol proto, int port)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SimulatorInterface * Th9xInterface::getSimulator()
|
||||
{
|
||||
return NULL; // new Th9xSimulator(this);
|
||||
}
|
||||
|
||||
@@ -46,12 +46,8 @@ class Th9xInterface : public EEPROMInterface
|
||||
|
||||
virtual int getSize(GeneralSettings &);
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual int isAvailable(Protocol proto, int port=0);
|
||||
|
||||
virtual SimulatorInterface * getSimulator();
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
|
||||
Reference in New Issue
Block a user