Merge pull request #3428 from opentx/schwabe/companion_multimodule

Implementation of the Multi TX module logic in Companion and few minor fixes/updates for the code
This commit is contained in:
Bertrand Songis
2016-04-21 21:55:49 +02:00
35 changed files with 512 additions and 176 deletions
+32 -3
View File
@@ -1380,9 +1380,9 @@ void ModelData::clear()
moduleData[0].channelsCount = 8;
moduleData[1].channelsStart = 0;
moduleData[1].channelsCount = 8;
moduleData[0].ppmDelay = 300;
moduleData[1].ppmDelay = 300;
moduleData[2].ppmDelay = 300;
moduleData[0].ppm.delay = 300;
moduleData[1].ppm.delay = 300;
moduleData[2].ppm.delay = 300;
int board = GetEepromInterface()->getBoard();
if (IS_TARANIS(board)) {
moduleData[0].protocol = PULSES_PXX_XJT_X16;
@@ -1830,3 +1830,32 @@ SimulatorInterface *GetCurrentFirmwareSimulator()
else
return NULL;
}
unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
switch (type) {
case MM_RF_PROTO_HISKY:
case MM_RF_PROTO_DSM2:
case MM_RF_PROTO_SYMAX:
case MM_RF_PROTO_KN:
return 2;
case MM_RF_PROTO_FRSKY:
case MM_RF_PROTO_CG023:
case MM_RF_PROTO_MT99XX:
return 3;
case MM_RF_PROTO_FLYSKY:
case MM_RF_PROTO_MJXQ:
return 4;
case MM_RF_PROTO_YD717:
return 5;
case MM_RF_PROTO_CX10:
case MM_RF_PROTO_CUSTOM:
return 8;
default:
return 1;
}
}
+59 -8
View File
@@ -849,9 +849,38 @@ enum PulsesProtocol {
PULSES_PXX_XJT_LR12,
PULSES_PXX_DJT,
PULSES_CROSSFIRE,
PULSES_MULTIMODULE,
PULSES_PROTOCOL_LAST
};
enum MultiModuleRFProtocols {
MM_RF_PROTO_FLYSKY=0,
MM_RF_PROTO_FIRST=MM_RF_PROTO_FLYSKY,
MM_RF_PROTO_HUBSAN,
MM_RF_PROTO_FRSKY,
MM_RF_PROTO_HISKY,
MM_RF_PROTO_V2X2,
MM_RF_PROTO_DSM2,
MM_RF_PROTO_DEVO,
MM_RF_PROTO_YD717,
MM_RF_PROTO_KN,
MM_RF_PROTO_SYMAX,
MM_RF_PROTO_SLT,
MM_RF_PROTO_CX10,
MM_RF_PROTO_CG023,
MM_RF_PROTO_BAYANG,
MM_RF_PROTO_ESky,
MM_RF_PROTO_MT99XX,
MM_RF_PROTO_MJXQ,
MM_RF_PROTO_SHENQI,
MM_RF_PROTO_FY326,
MM_RF_PROTO_SFHSS,
MM_RF_PROTO_CUSTOM,
MM_RF_PROTO_LAST= MM_RF_PROTO_CUSTOM
};
unsigned int getNumSubtypes(MultiModuleRFProtocols type);
enum TrainerProtocol {
TRAINER_MASTER_JACK,
TRAINER_SLAVE_JACK,
@@ -865,17 +894,39 @@ class ModuleData {
ModuleData() { clear(); }
unsigned int modelId;
int protocol;
int subprotocol;
unsigned int subType;
bool invertedSerial;
unsigned int channelsStart;
int channelsCount; // 0=8 channels
unsigned int failsafeMode;
int failsafeChannels[C9X_NUM_CHNOUT];
int ppmDelay;
bool ppmPulsePol; // false = positive
bool ppmOutputType; // false = open drain, true = push pull
int ppmFrameLength;
// By pure coincidence the struct are unions with the same datatype in Companion
// and the firmware itself. If this changes the multi struct needs it own logic in the eeprom interface
union {
struct {
int delay;
bool pulsePol; // false = positive
bool outputType; // false = open drain, true = push pull
int frameLength;
} ppm;
struct {
int rfProtocol;
bool autoBindMode;
bool lowPowerMode;
int optionValue;
} multi;
};
// Currently the Eeprom read/write code does not work with unions
// define a hack for the multi rf Protocol to get the real numbers here
// (reverse the int => ms logic of the ppm delay)
int getMultiRfProtocol () { return (multi.rfProtocol - 300) / 50; }
void setMultiRfProtocol (int val) { multi.rfProtocol = 300 + 50 * val; }
void clear() { memset(this, 0, sizeof(ModuleData)); }
QString polarityToString() const { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
QString polarityToString() const { return ppm.pulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
};
#define C9X_MAX_SCRIPTS 7
@@ -1630,9 +1681,9 @@ class Firmware {
}
virtual int getCapability(const Capability) = 0;
virtual QTime getMaxTimerStart() = 0;
virtual bool isTelemetrySourceAvailable(int source) = 0;
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
+3 -3
View File
@@ -373,17 +373,17 @@ t_Er9xModelData::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -505,17 +505,17 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -620,17 +620,17 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -447,9 +447,9 @@ t_Gruvin9xModelData_v102::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -517,9 +517,9 @@ t_Gruvin9xModelData_v103::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -587,9 +587,9 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -677,9 +677,9 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -455,9 +455,9 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -499,7 +499,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -533,9 +533,9 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -578,7 +578,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -615,9 +615,9 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -661,7 +661,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -698,9 +698,9 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -744,7 +744,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -785,9 +785,9 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -831,7 +831,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -735,9 +735,9 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -780,7 +780,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -818,9 +818,9 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -864,7 +864,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -902,9 +902,9 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -948,7 +948,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -986,9 +986,9 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1032,7 +1032,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -1073,9 +1073,9 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1119,7 +1119,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -932,9 +932,9 @@ t_Open9xModelData_v201::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1006,9 +1006,9 @@ t_Open9xModelData_v202::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter,
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1052,7 +1052,7 @@ t_Open9xModelData_v202::operator ModelData ()
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1082,9 +1082,9 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1126,7 +1126,7 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1156,9 +1156,9 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1202,7 +1202,7 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.frsky = frsky;
c9x.frsky.rssiAlarms[0] = frskyRssiAlarms[0].get(0);
c9x.frsky.rssiAlarms[1] = frskyRssiAlarms[1].get(1);
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1235,9 +1235,9 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1279,7 +1279,7 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0]. modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1314,9 +1314,9 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1362,7 +1362,7 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1400,9 +1400,9 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1449,7 +1449,7 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1487,9 +1487,9 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1536,7 +1536,7 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
@@ -1575,9 +1575,9 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1624,7 +1624,7 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
+17 -15
View File
@@ -3055,14 +3055,14 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
internalField.Append(new BoolField<1>(modelData.displayChecklist));
else
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.extendedLimits));
internalField.Append(new BoolField<1>(modelData.extendedTrims));
internalField.Append(new BoolField<1>(modelData.throttleReversed));
if (!IS_ARM(board) || version < 216) {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppm.delay, exportPpmDelay, importPpmDelay));
}
if (IS_ARM(board) || IS_2560(board))
@@ -3091,7 +3091,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (!IS_ARM(board) || version < 216) {
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppm.frameLength));
}
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc, "Throttle Source"));
@@ -3170,31 +3170,33 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_ARM(board) && version >= 215) {
for (int module=0; module<modulesCount; module++) {
if (version >= 217) {
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new ConversionField<SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new SignedField<4>(subprotocols[module]));
}
else {
internalField.Append(new SignedField<8>(subprotocols[module]));
}
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].channelsStart));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217)
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].failsafeMode));
else
internalField.Append(new ConversionField<SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217) {
internalField.Append(new UnsignedField<4>(modelData.moduleData[module].failsafeMode));
internalField.Append(new UnsignedField<3>(modelData.moduleData[module].subType));
internalField.Append(new BoolField<1>(modelData.moduleData[module].invertedSerial));
} else
internalField.Append(new ConversionField< UnsignedField<8> >(modelData.moduleData[module].failsafeMode, -1));
for (int i=0; i<32; i++) {
internalField.Append(new SignedField<16>(modelData.moduleData[module].failsafeChannels[i]));
}
if (version >= 217) {
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmOutputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.outputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
}
else {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppmPulsePol));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppm.pulsePol));
}
}
}
@@ -83,6 +83,7 @@ class ProtocolsConversionTable: public ConversionTable
}
if (IS_TARANIS(board)) {
addConversion(PULSES_CROSSFIRE, val++);
addConversion(PULSES_MULTIMODULE, val++);
}
}
};
@@ -865,6 +865,8 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
case PULSES_DSMX:
case PULSES_CROSSFIRE:
return 1;
case PULSES_MULTIMODULE:
return id.contains("multimodule") ? 1 : 0;
default:
return 0;
}
@@ -1148,6 +1150,7 @@ void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
firmware->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
}
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
@@ -1196,6 +1199,8 @@ void registerOpenTxFirmwares()
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
/* untested */
//firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
+1 -1
View File
@@ -273,7 +273,7 @@ t_Th9xModelData::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncTrims2Offsets;
if (trimSw) {
c9x.customFn[0].swtch = trimSw;
+76 -8
View File
@@ -181,6 +181,11 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
}
}
for (int i=0; i<=MM_RF_PROTO_LAST; i++)
{
ui->multiProtocol->addItem(ModelPrinter::printMultiRfProtocol(i), (QVariant) i);
}
if (firmware->getCapability(HasFailsafe)) {
for (int i=0; i<maxChannels; i++) {
QLabel * label = new QLabel(this);
@@ -226,6 +231,7 @@ ModulePanel::~ModulePanel()
#define MASK_PPM_FIELDS 16
#define MASK_FAILSAFES 32
#define MASK_OPEN_DRAIN 64
#define MASK_MULTIMODULE 128
void ModulePanel::update()
{
@@ -261,6 +267,9 @@ void ModulePanel::update()
mask |= MASK_OPEN_DRAIN;
}
break;
case PULSES_MULTIMODULE:
mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER | MASK_MULTIMODULE;
break;
case PULSES_OFF:
default:
break;
@@ -293,18 +302,44 @@ void ModulePanel::update()
// PPM settings fields
ui->label_ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setCurrentIndex(module.ppmPulsePol);
ui->ppmPolarity->setCurrentIndex(module.ppm.pulsePol);
ui->label_ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setCurrentIndex(module.ppmOutputType);
ui->ppmOutputType->setCurrentIndex(module.ppm.outputType);
ui->label_ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setValue(module.ppmDelay);
ui->ppmDelay->setValue(module.ppm.delay);
ui->label_ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setMinimum(module.channelsCount*(model->extendedLimits ? 2.250 : 2)+3.5);
ui->ppmFrameLength->setMaximum(firmware->getCapability(PPMFrameLength));
ui->ppmFrameLength->setValue(22.5+((double)module.ppmFrameLength)*0.5);
ui->ppmFrameLength->setValue(22.5+((double)module.ppm.frameLength)*0.5);
// Multi settings fields
ui->label_multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setCurrentIndex(module.getMultiRfProtocol());
ui->label_multiSubType->setVisible(mask & MASK_MULTIMODULE);
ui->multiSubType->setVisible(mask & MASK_MULTIMODULE);
if (mask & MASK_MULTIMODULE) {
int numEntries = getNumSubtypes(static_cast<MultiModuleRFProtocols>(module.getMultiRfProtocol()));
// Removes extra items
ui->multiSubType->setMaxCount(numEntries);
for (int i=0; i < numEntries; i++) {
if (i < ui->multiSubType->count())
ui->multiSubType->setItemText(i, ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i));
else
ui->multiSubType->addItem(ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i), (QVariant) i);
}
}
ui->multiSubType->setCurrentIndex(module.subType);
ui->cb_autoBind->setVisible(mask & MASK_MULTIMODULE);
ui->cb_autoBind->setChecked(module.multi.autoBindMode ? Qt::Checked : Qt::Unchecked);
ui->cb_lowPower->setVisible(mask & MASK_MULTIMODULE);
ui->cb_lowPower->setChecked(module.multi.lowPowerMode ? Qt::Checked : Qt::Unchecked);
if (firmware->getCapability(HasFailsafe)) {
ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES);
@@ -356,13 +391,13 @@ void ModulePanel::on_protocol_currentIndexChanged(int index)
void ModulePanel::on_ppmPolarity_currentIndexChanged(int index)
{
module.ppmPulsePol = index;
module.ppm.pulsePol = index;
emit modified();
}
void ModulePanel::on_ppmOutputType_currentIndexChanged(int index)
{
module.ppmOutputType = index;
module.ppm.outputType = index;
emit modified();
}
@@ -388,7 +423,7 @@ void ModulePanel::on_ppmDelay_editingFinished()
{
if (!lock) {
// TODO only accept valid values
module.ppmDelay = ui->ppmDelay->value();
module.ppm.delay = ui->ppmDelay->value();
emit modified();
}
}
@@ -401,7 +436,7 @@ void ModulePanel::on_rxNumber_editingFinished()
void ModulePanel::on_ppmFrameLength_editingFinished()
{
module.ppmFrameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
module.ppm.frameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
emit modified();
}
@@ -435,6 +470,39 @@ void ModulePanel::onFailsafeComboIndexChanged(int index)
}
}
void ModulePanel::on_multiProtocol_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.setMultiRfProtocol(index);
unsigned int maxSubTypes = getNumSubtypes(static_cast<MultiModuleRFProtocols>(index));
module.subType = std::min(module.subType, maxSubTypes -1);
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_multiSubType_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.subType = index;
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_autoBind_stateChanged(int state)
{
module.multi.autoBindMode = (state == Qt::Checked);
}
void ModulePanel::on_lowPower_stateChanged(int state)
{
module.multi.lowPowerMode = (state == Qt::Checked);
}
void ModulePanel::updateFailsafe(int channel)
{
int failsafeValue = module.failsafeChannels[channel];
+4
View File
@@ -65,6 +65,10 @@ class ModulePanel : public ModelPanel
void on_failsafeMode_currentIndexChanged(int value);
void onFailsafeComboIndexChanged(int index);
void onFailsafeSpinChanged(double value);
void on_multiProtocol_currentIndexChanged(int index);
void on_multiSubType_currentIndexChanged(int index);
void on_autoBind_stateChanged(int state);
void on_lowPower_stateChanged(int state);
private:
ModuleData & module;
+51
View File
@@ -534,6 +534,26 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_multiProtocol">
<property name="text">
<string>Multi Radio Protocol</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="multiProtocol">
<property name="maximumSize">
<size>
<width>125</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QLabel" name="label_rxNumber">
<property name="maximumSize">
@@ -571,6 +591,37 @@
</item>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_multiSubType">
<property name="text">
<string>SubType</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QComboBox" name="multiSubType">
<property name="maximumSize">
<size>
<width>125</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QCheckBox" name="cb_autoBind">
<property name="text">
<string>Autobind</string>
</property>
</widget>
</item>
<item row="4" column="5">
<widget class="QCheckBox" name="cb_lowPower">
<property name="text">
<string>Low Power</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+64 -5
View File
@@ -98,24 +98,83 @@ QString ModelPrinter::printModuleProtocol(unsigned int protocol)
"LP45", "DSM2", "DSMX",
"PPM16", "PPMsim",
"FrSky XJT (D16)", "FrSky XJT (D8)", "FrSky XJT (LR12)", "FrSky DJT",
"Crossfire"
"Crossfire",
"DIY Multiprotocol Module"
};
return CHECK_IN_ARRAY(strings, protocol);
}
QString ModelPrinter::printModule(int idx)
QString ModelPrinter::printMultiRfProtocol(int rfProtocol)
{
const ModuleData & module = model.moduleData[idx];
static const char *strings[] = {
"FlySky", "Hubsan", "FrSky", "Hisky", "V2x2", "DSM", "Devo", "YD717", "KN", "SymaX", "SLT", "CX10", "CG023",
"Bayang", "ESky", "MT99XX", "MJXQ", "Shenqi", "FY326", "SFHSS", "Custom"
};
if (rfProtocol > MM_RF_PROTO_CUSTOM)
return "Custom - proto " + QString::number(rfProtocol & 0x1f);
else
return CHECK_IN_ARRAY(strings, rfProtocol);
}
QString ModelPrinter::printMultiSubType(int rfProtocol, int subType) {
/* custom protocols */
if (rfProtocol >= MM_RF_PROTO_CUSTOM) {
static const char *custom_subtype_strings[] = {"Subtype 0","Subtype 1","Subtype 2","Subtype 3","Subtype 4","Subtype 5","Subtype 6","Subtype 7"};
return CHECK_IN_ARRAY(custom_subtype_strings, subType);
}
switch (rfProtocol) {
case MM_RF_PROTO_FLYSKY:
static const char *flysky_strings[] = {"Standard","V9x9","V6x6","V912"};
return CHECK_IN_ARRAY(flysky_strings, subType);
case MM_RF_PROTO_FRSKY:
static const char *frsky_strings[] = {"D16", "D8", "D16 8ch"};
return CHECK_IN_ARRAY(frsky_strings, subType);
case MM_RF_PROTO_HISKY:
static const char *hisky_strings[] = { "HiSky", "HK310" };
return CHECK_IN_ARRAY(hisky_strings, subType);
case MM_RF_PROTO_DSM2:
static const char *dsm2_strings[] = {"DSM2", "DSMX"};
return CHECK_IN_ARRAY(dsm2_strings, subType);
case MM_RF_PROTO_YD717:
static const char *yd717_strings[] = {"YD717", "Skywalker", "Syma X2", "XINXUN", "NIHUI"};
return CHECK_IN_ARRAY(yd717_strings, subType);
case MM_RF_PROTO_SYMAX:
static const char *symax_strings[] = {"Standard", "Syma X5C"};
return CHECK_IN_ARRAY(symax_strings, subType);
case MM_RF_PROTO_CX10:
static const char *cx10_strings[] = {"Green", "Blue", "DM007", "Q282", "JC3015a", "JC3015b", "MK33041", "Q242"};
return CHECK_IN_ARRAY(cx10_strings, subType);
case MM_RF_PROTO_CG023:
static const char *cg023_strings[] = {"CG023", "YD829", "H3 3D"};
return CHECK_IN_ARRAY(cg023_strings, subType);
case MM_RF_PROTO_KN:
static const char* kn_strings[] = {"WLtoys", "FeiLun"};
return CHECK_IN_ARRAY(kn_strings, subType);
case MM_RF_PROTO_MT99XX:
static const char* mt99_strings[] = {"MT99","H7","YZ"};
return CHECK_IN_ARRAY(mt99_strings, subType);
case MM_RF_PROTO_MJXQ:
static const char* mjxq_strings[] = {"WLH08", "X600", "X800", "H26D"};
return CHECK_IN_ARRAY(mjxq_strings, subType);
default:
return "DEFAULT";
}
}
QString ModelPrinter::printModule(int idx) {
const ModuleData &module = model.moduleData[idx];
if (module.protocol == PULSES_OFF)
return printModuleProtocol(module.protocol);
else if (module.protocol == PULSES_PPM)
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart + 1).arg(module.channelsStart + module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
else {
QString result = tr("%1, Channels(%2-%3)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount);
if (module.protocol != PULSES_PXX_XJT_D8) {
result += " " + tr("Receiver number(%1)").arg(module.modelId);
}
if (module.protocol == PULSES_MULTIMODULE)
result += " " + tr("radio Protocol %1, subType %2, option value %3").arg(printMultiRfProtocol(module.multi.rfProtocol)).arg(printMultiSubType(module.multi.rfProtocol, module.subType)).arg(module.multi.optionValue);
return result;
}
}
@@ -125,7 +184,7 @@ QString ModelPrinter::printTrainerMode()
QString result;
switch (model.trainerMode) {
case 1:
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
break;
case 2:
result = tr("Master/SBUS Module");
+2
View File
@@ -38,6 +38,8 @@ class ModelPrinter: public QObject
QString printTrimIncrementMode();
QString printThrottleTrimMode();
static QString printModuleProtocol(unsigned int protocol);
static QString printMultiRfProtocol(int rfProtocol);
static QString printMultiSubType(int rfProtocol, int subType);
QString printFlightModeSwitch(int index);
QString printFlightModeName(int index);
QString printFlightModes(unsigned int flightModes);
+3 -3
View File
@@ -124,12 +124,12 @@ void saveModel(ModelData & m, model & xm)
}
}
*/
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppmDelay != 300 || m.moduleData[0].ppmPulsePol != 0) {
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppm.delay != 300 || m.moduleData[0].ppm.pulsePol != 0) {
modulation mod;
mod.type(modulation::type_type::value(m.moduleData[0].protocol));
mod.channels(m.moduleData[0].channelsCount);
mod.delay(m.moduleData[0].ppmDelay);
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppmPulsePol));
mod.delay(m.moduleData[0].ppm.delay);
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppm.pulsePol));
xm.modulation(mod);
}
{
+4 -3
View File
@@ -196,7 +196,7 @@ int getSwitchWarningsCount()
#define TRAINER_CHANNELS_ROWS() IF_TRAINER_ON(1)
#define PORT_CHANNELS_ROWS(x) (x==INTERNAL_MODULE ? INTERNAL_MODULE_CHANNELS_ROWS : (x==EXTERNAL_MODULE ? EXTERNAL_MODULE_CHANNELS_ROWS : TRAINER_CHANNELS_ROWS()))
#if defined MULTIMODULE
#define MULTIMODULE_HASOPTIONS(x) (x == MM_RF_PROTO_HUBSAN || x == MM_RF_PROTO_FRSKY || x == MM_RF_PROTO_DSM2 || x >= MM_RF_PROTO_CUSTOM)
#define MULTIMODULE_HASOPTIONS(x) (x == MM_RF_PROTO_HUBSAN || x == MM_RF_PROTO_FRSKY || x == MM_RF_PROTO_DSM2 || x == MM_RF_PROTO_SFHSS || x >= MM_RF_PROTO_CUSTOM)
#define MULTIMODULE_FAILSAFEROWS(x) (IS_MODULE_MULTIMODULE(x) && (MULTIMODULE_HASOPTIONS(g_model.moduleData[x].multi.rfProtocol))) ? (uint8_t) 1: HIDDEN_ROW
#else
#define MULTIMODULE_FAILSAFEROWS(x) HIDDEN_ROW
@@ -696,7 +696,7 @@ void menuModelSetup(uint8_t event)
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN+11*FW, y, STR_SUBTYPE_FLYSKY, g_model.moduleData[EXTERNAL_MODULE].subType, menuHorizontalPosition==2 ? attr : 0);
break;
case MM_RF_PROTO_FRSKY:
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN+11*FW, y, STR_XJT_PROTOCOLS, g_model.moduleData[EXTERNAL_MODULE].subType+1, menuHorizontalPosition==2 ? attr : 0);
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN+11*FW, y, STR_SUBTYPE_FRSKY, g_model.moduleData[EXTERNAL_MODULE].subType, menuHorizontalPosition==2 ? attr : 0);
break;
case MM_RF_PROTO_HISKY:
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN+10*FW, y, STR_SUBTYPE_HISKY, g_model.moduleData[EXTERNAL_MODULE].subType, menuHorizontalPosition==2 ? attr : 0);
@@ -764,11 +764,11 @@ void menuModelSetup(uint8_t event)
case MM_RF_PROTO_DSM2:
case MM_RF_PROTO_SYMAX:
case MM_RF_PROTO_KN:
case MM_RF_PROTO_FRSKY:
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[EXTERNAL_MODULE].subType, 0, 1);
break;
case MM_RF_PROTO_CG023:
case MM_RF_PROTO_MT99XX:
case MM_RF_PROTO_FRSKY:
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[EXTERNAL_MODULE].subType, 0, 2);
break;
case MM_RF_PROTO_FLYSKY:
@@ -940,6 +940,7 @@ void menuModelSetup(uint8_t event)
else if (IS_MODULE_MULTIMODULE(moduleIdx)) {
switch (g_model.moduleData[moduleIdx].multi.rfProtocol) {
case MM_RF_PROTO_FRSKY:
case MM_RF_PROTO_SFHSS:
lcd_putsLeft(y, STR_MULTI_RFTUNE);
break;
case MM_RF_PROTO_HUBSAN:
+3 -1
View File
@@ -469,10 +469,11 @@ enum Protocols {
PROTO_DSM2_DSM2,
PROTO_DSM2_DSMX,
#endif
#if defined(CROSSFIRE)
#if defined(CROSSFIRE) || defined(MULTIMODULE)
PROTO_CROSSFIRE,
#endif
#if defined(IRPROTOS)
// only used on AVR
// we will need 4 bits for proto :(
PROTO_SILV,
PROTO_TRAC09,
@@ -515,6 +516,7 @@ enum MultiModuleRFProtocols {
MM_RF_PROTO_MJXQ,
MM_RF_PROTO_SHENQI,
MM_RF_PROTO_FY326,
MM_RF_PROTO_SFHSS,
MM_RF_PROTO_CUSTOM,
MM_RF_PROTO_LAST= MM_RF_PROTO_CUSTOM
};
+9 -3
View File
@@ -138,11 +138,17 @@ void setupPulsesMultimodule(unsigned int port)
type= type +1;
if (g_model.moduleData[port].multi.rfProtocol == MM_RF_PROTO_FRSKY) {
if(subtype == 1)
if(subtype == 1) {
//D8
type = 3;
else
subtype = 0;
} else {
type = 15;
subtype = 0;
if (subtype==2) // D16 8ch
subtype=1;
else
subtype=0; // D16
}
}
if (g_model.moduleData[port].multi.rfProtocol >= MM_RF_PROTO_CUSTOM)
+1
View File
@@ -110,6 +110,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
#if defined(MULTIMODULE)
ISTR(MULTI_PROTOCOLS)
ISTR(SUBTYPE_FLYSKY)
ISTR(SUBTYPE_FRSKY)
ISTR(SUBTYPE_HISKY)
ISTR(SUBTYPE_YD717)
ISTR(SUBTYPE_SYMAX)
+3 -1
View File
@@ -192,7 +192,8 @@ extern const pm_char STR_OPEN9X[];
#if defined(MULTIMODULE)
#define OFS_MULTI_PROTOCOLS (OFS_DSM_PROTOCOLS + sizeof(TR_DSM_PROTOCOLS))
#define OFS_SUBTYPE_FLYSKY (OFS_MULTI_PROTOCOLS + sizeof(TR_MULTI_PROTOCOLS))
#define OFS_SUBTYPE_HISKY (OFS_SUBTYPE_FLYSKY + sizeof(TR_SUBTYPE_FLYSKY))
#define OFS_SUBTYPE_FRSKY (OFS_SUBTYPE_FLYSKY + sizeof(TR_SUBTYPE_FLYSKY))
#define OFS_SUBTYPE_HISKY (OFS_SUBTYPE_FRSKY + sizeof(TR_SUBTYPE_FRSKY))
#define OFS_SUBTYPE_YD717 (OFS_SUBTYPE_HISKY + sizeof(TR_SUBTYPE_HISKY))
#define OFS_SUBTYPE_SYMAX (OFS_SUBTYPE_YD717 + sizeof(TR_SUBTYPE_YD717))
#define OFS_SUBTYPE_CX10 (OFS_SUBTYPE_SYMAX + sizeof(TR_SUBTYPE_SYMAX))
@@ -323,6 +324,7 @@ extern const pm_char STR_OPEN9X[];
#if defined(MULTIMODULE)
#define STR_MULTI_PROTOCOLS (STR_OPEN9X + OFS_MULTI_PROTOCOLS)
#define STR_SUBTYPE_FLYSKY (STR_OPEN9X + OFS_SUBTYPE_FLYSKY)
#define STR_SUBTYPE_FRSKY (STR_OPEN9X + OFS_SUBTYPE_FRSKY)
#define STR_SUBTYPE_HISKY (STR_OPEN9X + OFS_SUBTYPE_HISKY)
#define STR_SUBTYPE_YD717 (STR_OPEN9X + OFS_SUBTYPE_YD717)
#define STR_SUBTYPE_SYMAX (STR_OPEN9X + OFS_SUBTYPE_SYMAX)
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1233,4 +1233,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+4 -3
View File
@@ -109,12 +109,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX" //LP45 =Low Power 4 und 5 Kanal
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM?\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE für FRSKY nutzt TR_XJT_PROTOCOLS mit Offset +1
#define LEN_SUBTYPE_FRSKY "\007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -122,7 +123,7 @@
// SUBTYPE für DSMX nutzt TR_DSM_PROTOCOLS mit Offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "\007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1250,4 +1250,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1196,4 +1196,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1196,4 +1196,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1223,4 +1223,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -5
View File
@@ -104,13 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -118,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1232,4 +1232,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -5
View File
@@ -105,13 +105,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -119,7 +119,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1247,4 +1247,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+46 -2
View File
@@ -96,7 +96,7 @@
#define TR_COUNTRYCODES TR("US""JP""EU", "Ameryka""Japonia""Europa\0")
#define LEN_TARANIS_PROTOCOLS "\004"
#define TR_TARANIS_PROTOCOLS "OFF\0""PPM\0""XJT\0""DSM2""CRSF"
#define TR_TARANIS_PROTOCOLS "OFF\0""PPM\0""XJT\0""DSM2""CRSF""MULT"
#define LEN_XJT_PROTOCOLS "\004"
#define TR_XJT_PROTOCOLS "OFF\0""D16\0""D8\0 ""LR12"
@@ -104,6 +104,44 @@
#define LEN_DSM_PROTOCOLS "\004"
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
#define LEN_SUBTYPE_FRSKY "\007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
#define LEN_SUBTYPE_CX10 "\007"
#define TR_SUBTYPE_CX10 "Green\0 ""Blue\0 ""DM007\0 ""Q282\0 ""JC3015a""JC3015b""MK33041""Q242\0 "
#define LEN_SUBTYPE_CG023 "\005"
#define TR_SUBTYPE_CG023 "CG023""YD829""H3 3d"
#define LEN_SUBTYPE_KN "\006"
#define TR_SUBTYPE_KN "WLtoys""FeiLun"
#define LEN_SUBTYPE_MT99 "\004"
#define TR_SUBTYPE_MT99 "MT99""H7\0 ""YZ\0 "
#define LEN_SUBTYPE_MJXQ "\005"
#define TR_SUBTYPE_MJXQ "WLH08""X600\0""X800\0""H26D"
#define LEN_OPTIONS_DSM "\011"
#define TR_OPTIONS_DSM " 4ch 22ms"" 5ch 22ms"" 6ch 22ms"" 7ch 22ms"" 4ch 11ms"" 5ch 11ms"" 6ch 11ms"" 7ch 11ms"" 8ch 22ms"" 9ch 22ms""10ch 22ms""11ch 22ms""12ch 22ms"
#define LEN_VTRIMINC TR("\006", "\013") /*11 decimal*/
#define TR_VTRIMINC TR("Expo\0 ""B.Dokł""Dokł.\0""Średni""Zgrubn", "Expotencja ""B.Dokładny\0""Dokładny\0 ""Średni\0 ""Zgrubny\0 ")
@@ -811,6 +849,12 @@
#else
#define TR_RXNUM "NumOdb"
#endif
#define TR_MULTI_RFTUNE INDENT "RF Freq. fine tune"
#define TR_MULTI_VIDFREQ INDENT "Video frequency"
#define TR_MULTI_DSMFRAME INDENT "DSM frame format"
#define TR_MULTI_OPTION INDENT "Option value"
#define TR_MULTI_AUTOBIND INDENT "Autobind"
#define TR_MULTI_LOWPOWER INDENT "Low power mode"
#define TR_SYNCMENU "[Synch]"
#define TR_LIMIT INDENT "Limit"
#define TR_MINRSSI "Min Rssi"
@@ -1190,4 +1234,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+6 -4
View File
@@ -104,12 +104,14 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "\007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -117,7 +119,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1190,4 +1192,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+5 -4
View File
@@ -104,12 +104,13 @@
#define TR_DSM_PROTOCOLS "LP45""DSM2""DSMX"
#define LEN_MULTI_PROTOCOLS "\006"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""Custom"
#define TR_MULTI_PROTOCOLS "FlySky""Hubsan""FrSky\0""Hisky\0""V2x2\0 ""DSM2\0 ""Devo\0 ""YD717\0""KN\0 ""SymaX\0""SLT\0 ""CX10\0 ""CG023\0""Bayang""ESky\0 ""MT99XX""MJXQ\0 ""Shenqi""FY326\0""SFHSS\0""Custom"
#define LEN_SUBTYPE_FLYSKY "\004"
#define TR_SUBTYPE_FLYSKY "Std\0""V9x9""V6x6""V912"
// SUBTYPE FOR FRSKY use TR_XJT_PROTOCOLS with offset +1
#define LEN_SUBTYPE_FRSKY "\007"
#define TR_SUBTYPE_FRSKY "D16\0 ""D8\0 ""D16 8ch"
#define LEN_SUBTYPE_HISKY "\005"
#define TR_SUBTYPE_HISKY "HiSky""HK310"
@@ -117,7 +118,7 @@
// SUBTYPE FOR DSMX use TR_DSM_PROTOCOLS with offset +1
#define LEN_SUBTYPE_YD717 "\007"
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""SYMAX2\0""XINXUN\0""NIHUI\0 "
#define TR_SUBTYPE_YD717 "YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 "
#define LEN_SUBTYPE_SYMAX "\003"
#define TR_SUBTYPE_SYMAX "Std""5c\0"
@@ -1247,4 +1248,4 @@
#define ZSTR_TX_POWER "TPWR"
#define ZSTR_TX_RSSI "TRSS"
#define ZSTR_TX_QUALITY "TQly"
#define ZSTR_TX_SNR "TSNR"
#define ZSTR_TX_SNR "TSNR"
+8 -4
View File
@@ -254,7 +254,8 @@ options_taranis = {
"internalppm": ("TARANIS_INTERNAL_PPM", "YES", "NO"),
"shutdownconfirm": ("SHUTDOWN_CONFIRMATION", "YES", "NO"),
"timer3": ("TIMERS", "3", "2"),
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO")
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
"multimodule": ("MULTIMODULE", "YES", "NO")
}
options_taranisplus = {
@@ -273,7 +274,8 @@ options_taranisplus = {
"internalppm": ("TARANIS_INTERNAL_PPM", "YES", "NO"),
"shutdownconfirm": ("SHUTDOWN_CONFIRMATION", "YES", "NO"),
"timer3": ("TIMERS", "3", None),
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO")
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
"multimodule": ("MULTIMODULE", "YES", "NO")
}
options_taranisx9e = {
@@ -293,7 +295,8 @@ options_taranisx9e = {
"shutdownconfirm": ("SHUTDOWN_CONFIRMATION", "YES", "NO"),
"timer3": ("TIMERS", "3", None),
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
"horussticks": ("STICKS", "HORUS", "STANDARD")
"horussticks": ("STICKS", "HORUS", "STANDARD"),
"multimodule": ("MULTIMODULE", "YES", "NO")
}
options_horus = {
@@ -307,5 +310,6 @@ options_horus = {
"massstorage": ("USB", "MASSSTORAGE", None),
"cli": ("USB", "SERIAL", None),
"timer3": ("TIMERS", "3", "2"),
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO")
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
"multimodule": ("MULTIMODULE", "YES", "NO")
}