Merge branch 'next' of https://github.com/opentx/opentx into TaranisPlus
Conflicts: companion/src/firmwares/opentx/opentxinterface.cpp radio/src/haptic.cpp radio/src/targets/gruvin9x/board_gruvin9x.h radio/src/targets/mega2560/board_mega2560.h radio/src/targets/sky9x/board_sky9x.h radio/src/targets/stock/board_stock.h radio/src/targets/taranis/board_taranis.h radio/src/targets/taranis/haptic_driver.cpp
This commit is contained in:
@@ -81,6 +81,7 @@ int main(int argc, char *argv[])
|
||||
app.setApplicationName("OpenTX Companion");
|
||||
app.setOrganizationName("OpenTX");
|
||||
app.setOrganizationDomain("open-tx.org");
|
||||
app.setAttribute(Qt::AA_DontShowIconsInMenus, false);
|
||||
|
||||
#ifdef __APPLE__
|
||||
app.setStyle(new MyProxyStyle);
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<file>images/wizard/models.png</file>
|
||||
<file>images/wizard/multirotor.png</file>
|
||||
<file>images/wizard/rudder.png</file>
|
||||
<file>images/wizard/options.png</file>
|
||||
<file>images/wizard/simpletail.png</file>
|
||||
<file>images/wizard/tail.png</file>
|
||||
<file>images/wizard/tails.png</file>
|
||||
|
||||
@@ -87,26 +87,42 @@ const uint8_t modn12x3[4][4]= {
|
||||
#define STK_P2 6
|
||||
#define STK_P3 7
|
||||
|
||||
#define DSW_THR 1 //DSW_SA ^
|
||||
#define DSW_RUD 2 //DSW_SA -
|
||||
#define DSW_ELE 3 //DSW_SA _
|
||||
#define DSW_ID0 4 //DSW_SB ^
|
||||
#define DSW_ID1 5 //DSW_SB -
|
||||
#define DSW_ID2 6 //DSW_SB _
|
||||
#define DSW_AIL 7 //DSW_SC ^
|
||||
#define DSW_GEA 8 //DSW_SC -
|
||||
#define DSW_TRN 9 //DSW_SC _
|
||||
#define DSW_SD0 10
|
||||
#define DSW_SD1 11
|
||||
#define DSW_SD2 12
|
||||
#define DSW_SE0 13
|
||||
#define DSW_SE1 14
|
||||
#define DSW_SE2 15
|
||||
#define DSW_SF0 16
|
||||
#define DSW_SF1 17
|
||||
#define DSW_SG0 18
|
||||
#define DSW_SG1 19
|
||||
#define DSW_SG2 20
|
||||
enum Switches {
|
||||
SWITCH_NONE,
|
||||
|
||||
SWITCH_THR = SWITCH_NONE+1,
|
||||
SWITCH_RUD,
|
||||
SWITCH_ELE,
|
||||
SWITCH_ID0,
|
||||
SWITCH_ID1,
|
||||
SWITCH_ID2,
|
||||
SWITCH_AIL,
|
||||
SWITCH_GEA,
|
||||
SWITCH_TRN,
|
||||
|
||||
SWITCH_SA0 = SWITCH_NONE+1,
|
||||
SWITCH_SA1,
|
||||
SWITCH_SA2,
|
||||
SWITCH_SB0,
|
||||
SWITCH_SB1,
|
||||
SWITCH_SB2,
|
||||
SWITCH_SC0,
|
||||
SWITCH_SC1,
|
||||
SWITCH_SC2,
|
||||
SWITCH_SD0,
|
||||
SWITCH_SD1,
|
||||
SWITCH_SD2,
|
||||
SWITCH_SE0,
|
||||
SWITCH_SE1,
|
||||
SWITCH_SE2,
|
||||
SWITCH_SF0,
|
||||
SWITCH_SF1,
|
||||
SWITCH_SG0,
|
||||
SWITCH_SG1,
|
||||
SWITCH_SG2,
|
||||
SWITCH_SH0,
|
||||
SWITCH_SH1
|
||||
};
|
||||
|
||||
#define TRIM_LH_L 0
|
||||
#define TRIM_LH_R 1
|
||||
@@ -1037,8 +1053,6 @@ enum Capability {
|
||||
Beeperlen,
|
||||
EepromBackup,
|
||||
Haptic,
|
||||
HapticLength,
|
||||
HapticMode,
|
||||
HasBeeper,
|
||||
ModelTrainerEnable,
|
||||
Timer2ThrTrig,
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#define LUA
|
||||
#define LUA_MODEL_SCRIPTS
|
||||
#define EEPROM_VARIANT 3
|
||||
#define HAPTIC
|
||||
|
||||
#define NUM_POTS 5
|
||||
|
||||
@@ -99,6 +100,8 @@ inline int geteepromsize() {
|
||||
#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"
|
||||
|
||||
@@ -494,8 +494,9 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
||||
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:
|
||||
@@ -571,9 +572,6 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
||||
case HasFuncRepeat:
|
||||
case HasContrast:
|
||||
return 1;
|
||||
case HapticLength:
|
||||
case HapticMode:
|
||||
return 1;
|
||||
case Beeperlen:
|
||||
return 1;
|
||||
case MaxVolume:
|
||||
@@ -662,7 +660,7 @@ int OpenTxFirmware::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;
|
||||
|
||||
@@ -201,23 +201,18 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
||||
|
||||
if (!GetCurrentFirmware()->getCapability(Haptic)) {
|
||||
ui->hapticStrengthSB->setDisabled(true);
|
||||
ui->hapticStrengthSB->hide();
|
||||
ui->label_hapticStrengthSB->hide();
|
||||
}
|
||||
|
||||
if (!GetCurrentFirmware()->getCapability(HapticMode)) {
|
||||
ui->hapticmodeCB->setDisabled(true);
|
||||
ui->hapticmodeCB->hide();
|
||||
ui->label_hapticmode->hide();
|
||||
}
|
||||
|
||||
int renumber=GetCurrentFirmware()->getCapability(RotaryEncoders);
|
||||
if (renumber==0) {
|
||||
ui->re_label->hide();
|
||||
ui->re_CB->hide();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
populateRotEncCB(ui->re_CB, g_eeGeneral.reNavigation, renumber);
|
||||
}
|
||||
|
||||
ui->contrastSB->setValue(g_eeGeneral.contrast);
|
||||
ui->battwarningDSB->setValue((double)g_eeGeneral.vBatWarn/10);
|
||||
ui->backlightautoSB->setValue(g_eeGeneral.backlightDelay*5);
|
||||
@@ -344,11 +339,12 @@ void GeneralEdit::setValues()
|
||||
ui->beeperCB->setCurrentIndex(g_eeGeneral.beeperMode+2);
|
||||
ui->channelorderCB->setCurrentIndex(g_eeGeneral.templateSetup);
|
||||
ui->stickmodeCB->setCurrentIndex(g_eeGeneral.stickMode);
|
||||
if (!GetCurrentFirmware()->getCapability(HapticLength)) {
|
||||
if (GetCurrentFirmware()->getCapability(Haptic)) {
|
||||
ui->hapticLengthCB->setCurrentIndex(g_eeGeneral.hapticLength+2);
|
||||
}
|
||||
else {
|
||||
ui->label_HL->hide();
|
||||
ui->hapticLengthCB->hide();
|
||||
} else {
|
||||
ui->hapticLengthCB->setCurrentIndex(g_eeGeneral.hapticLength+2);
|
||||
}
|
||||
ui->BLBright_SB->setValue(100-g_eeGeneral.backlightBright);
|
||||
ui->soundModeCB->setCurrentIndex(g_eeGeneral.speakerMode);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -2023,7 +2023,7 @@ for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
|
||||
|
||||
// Copy current profile to new and give it a new name
|
||||
g.profile[i] = g.profile[g.id()];
|
||||
g.profile[i].name( QString("New Radio"));
|
||||
g.profile[i].name( QString(tr("New Radio")));
|
||||
|
||||
g.id(i);
|
||||
updateMenus();
|
||||
|
||||
@@ -674,8 +674,8 @@ void MdiChild::print(int model, QString filename)
|
||||
}
|
||||
|
||||
if (pd) {
|
||||
pd->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
pd->show();
|
||||
delete pd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,8 +224,8 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
@@ -286,18 +286,18 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
switch (gyro) {
|
||||
case 1:
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
case 2:
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -311,25 +311,25 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
switch (gyro) {
|
||||
case 1:
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
case 2:
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
break;
|
||||
case 2:
|
||||
ailerons=ailerontype;
|
||||
@@ -415,8 +415,8 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
@@ -440,8 +440,8 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
}
|
||||
}
|
||||
if (spoilers>0) {
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6); md->speedUp=4;;md->speedDown=4;
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6);md->speedUp=4;md->speedDown=4;
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6); md->speedUp=4;;md->speedDown=4;
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6);md->speedUp=4;md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< spoilers; i++) {
|
||||
@@ -510,8 +510,8 @@ void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
@@ -630,19 +630,19 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA);
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
@@ -676,19 +676,19 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
@@ -723,8 +723,8 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
}
|
||||
}
|
||||
}
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;
|
||||
}
|
||||
|
||||
//Heli Setup futaba style
|
||||
@@ -742,19 +742,19 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA);
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
@@ -788,19 +788,19 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
@@ -835,8 +835,8 @@ void Templates::applyTemplate(uint8_t idx)
|
||||
}
|
||||
}
|
||||
}
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,SWITCH_GEA); md->sOffset=100;
|
||||
}
|
||||
|
||||
//Servo Test
|
||||
|
||||
+3079
-2249
File diff suppressed because it is too large
Load Diff
@@ -6331,7 +6331,7 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location filename="../modeledit/customfunctions.cpp" line="19"/>
|
||||
<source>Played once, not during startup</source>
|
||||
<translation>Lu une fois, mais pas à la mose en route</translation>
|
||||
<translation>Lu une fois, mais pas à la mise en route</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../modeledit/customfunctions.cpp" line="26"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<context>
|
||||
<name>AileronsPage</name>
|
||||
<message>
|
||||
<location filename="../wizarddialog.cpp" line="+392"/>
|
||||
<location filename="../wizarddialog.cpp" line="+395"/>
|
||||
<source>No</source>
|
||||
<translation>Nej</translation>
|
||||
</message>
|
||||
@@ -325,11 +325,22 @@ Mode 4:
|
||||
</message>
|
||||
<message>
|
||||
<location line="+36"/>
|
||||
<source>Radio Firmware</source>
|
||||
<translation>Firmware-typ</translation>
|
||||
<source>Radio Type</source>
|
||||
<translation>Radiotyp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+52"/>
|
||||
<location line="+88"/>
|
||||
<source>Set voice language.
|
||||
May be different from firmware language</source>
|
||||
<translation>Välj röstspråk.
|
||||
Behöver inte vara samma som menyspråk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Radio Firmware</source>
|
||||
<translation type="obsolete">Firmware-typ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-36"/>
|
||||
<source>Other Settings</source>
|
||||
<translation>Andra Inställningar</translation>
|
||||
</message>
|
||||
@@ -344,14 +355,13 @@ Mode 4:
|
||||
<translation>Sökväg till SD-struktur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+16"/>
|
||||
<source>Set language of voice.
|
||||
May be different from firmware language</source>
|
||||
<translation>Välj språk för röstfunktioner.
|
||||
<translation type="obsolete">Välj språk för röstfunktioner.
|
||||
Behöver inte vara samma som menyspråket</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+15"/>
|
||||
<location line="+31"/>
|
||||
<source>Voice Language</source>
|
||||
<translation>Röstspråk</translation>
|
||||
</message>
|
||||
@@ -1160,7 +1170,7 @@ Behöver inte vara samma som menyspråket</translation>
|
||||
<context>
|
||||
<name>ConclusionPage</name>
|
||||
<message>
|
||||
<location filename="../wizarddialog.cpp" line="+287"/>
|
||||
<location filename="../wizarddialog.cpp" line="+308"/>
|
||||
<source>OK, I understand.</source>
|
||||
<translation>OK, jag förstår.</translation>
|
||||
</message>
|
||||
@@ -1415,7 +1425,7 @@ Behöver inte vara samma som menyspråket</translation>
|
||||
<context>
|
||||
<name>CyclicPage</name>
|
||||
<message>
|
||||
<location filename="../wizarddialog.cpp" line="-154"/>
|
||||
<location filename="../wizarddialog.cpp" line="-175"/>
|
||||
<source>90</source>
|
||||
<translation>90</translation>
|
||||
</message>
|
||||
@@ -1684,11 +1694,17 @@ Om fältet lämnas tomt så är filtret aktivt hela tiden.</translation>
|
||||
<translation>Röst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+13"/>
|
||||
<source>Set language of voice.
|
||||
May be different from firmware language</source>
|
||||
<translation>Välj språk för röstfunktioner.
|
||||
<translation type="obsolete">Välj språk för röstfunktioner.
|
||||
Får skilja från språket för firmware</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+13"/>
|
||||
<source>Set voice language.
|
||||
May be different from firmware language</source>
|
||||
<translation>Välj röstspråk.
|
||||
Behöver inte vara samma som menyspråk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
@@ -1751,12 +1767,7 @@ Får skilja från språket för firmware</translation>
|
||||
<translation>Firmware</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+23"/>
|
||||
<source>-</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<location line="+30"/>
|
||||
<source>Latest Download</source>
|
||||
<translation>Senast nedladdad</translation>
|
||||
</message>
|
||||
@@ -3861,7 +3872,12 @@ Vill du ladda ned den nu ?</translation>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+42"/>
|
||||
<location line="+23"/>
|
||||
<source>New Radio</source>
|
||||
<translation>Ny Radio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+19"/>
|
||||
<source>Unable to find file %1!</source>
|
||||
<translation>Kan inte hitta filen %1 !</translation>
|
||||
</message>
|
||||
@@ -5455,6 +5471,19 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Roll-kanal:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsPage</name>
|
||||
<message>
|
||||
<location line="+23"/>
|
||||
<source>Throttle Cut</source>
|
||||
<translation>Gassäkring</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Throttle Timer</source>
|
||||
<translation>Gastimer</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrintDialog</name>
|
||||
<message>
|
||||
@@ -5852,9 +5881,13 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>System of units</source>
|
||||
<source>Units system</source>
|
||||
<translation>Måttsystem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>System of units</source>
|
||||
<translation type="obsolete">Måttsystem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Blades</source>
|
||||
@@ -6498,7 +6531,7 @@ p, li { white-space: pre-wrap; }
|
||||
<location line="+29"/>
|
||||
<location line="+25"/>
|
||||
<source>In model setup menus automatically set source by moving the control</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Välj automatisk kontroller i menyn för modelinställningar genom att använda dem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-155"/>
|
||||
@@ -6508,7 +6541,7 @@ p, li { white-space: pre-wrap; }
|
||||
<location line="+29"/>
|
||||
<location line="+25"/>
|
||||
<source>In model setup menus automatically set switch by moving the control</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Välj automatisk brytare i menyn för modelinställningar genom att använda dem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-138"/>
|
||||
@@ -7860,20 +7893,22 @@ Gruppen bakom OpenTX/Companion.</translation>
|
||||
<message>
|
||||
<location filename="../firmwares/opentx/open9xStockeeprom.cpp" line="+92"/>
|
||||
<source>Simultaneous usage of expo and curves is no longer supported in OpenTX</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Det går inte att använda Expo på en specialkurva i OpenTX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../warnings.h" line="+5"/>
|
||||
<source>Thank you for upgrading to OpenTX 2.0. This is a major upgrade that adds and modifies a lot of things, so please make sure that you read release notes carefully to learn about the changes, and thoroughly check each of your models for proper function.
|
||||
|
||||
The OpenTX Team.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Tack för att du uppgraderat till OpenTX 2.0. Denna version innehåller många förbättringar och förändringar jämfört med tidiagare versioner. Läs gärna om förändringarna i dokumentet Release Notes. Kontrollera noggrant funktionen hos samtliga modeller som uppgraderas.
|
||||
|
||||
OpenTX-gruppen.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RudderPage</name>
|
||||
<message>
|
||||
<location filename="../wizarddialog.cpp" line="-235"/>
|
||||
<location filename="../wizarddialog.cpp" line="-259"/>
|
||||
<source>No</source>
|
||||
<translation>Nej</translation>
|
||||
</message>
|
||||
@@ -8848,7 +8883,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
||||
<context>
|
||||
<name>WizardDialog</name>
|
||||
<message>
|
||||
<location line="-265"/>
|
||||
<location line="-268"/>
|
||||
<source>Model Wizard</source>
|
||||
<translation>Modellguide</translation>
|
||||
</message>
|
||||
@@ -9016,6 +9051,16 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
||||
<source>Select the control channels for your multirotor</source>
|
||||
<translation>Välj kontroll-kanaler för din multikopter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Model Options</source>
|
||||
<translation>Modell-funktioner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Select additional options</source>
|
||||
<translation>Välj ytterligare funktioner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Save Changes</source>
|
||||
@@ -9101,16 +9146,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
||||
<location line="+2"/>
|
||||
<location line="+2"/>
|
||||
<location line="+8"/>
|
||||
<location line="+2"/>
|
||||
<source>TBD.</source>
|
||||
<translation>Information saknas för denna dialog.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-6"/>
|
||||
<location line="-8"/>
|
||||
<source>Select the control channels for your multirotor.<br><br>Throttle - Spektrum: CH1, Futaba: CH3<br>Yaw - Spektrum: CH4, Futaba: CH4<br>Pitch - Spektrum: CH3, Futaba: CH2<br>Roll - Spektrum: CH2, Futaba: CH1</source>
|
||||
<translation>Välj vilka kanaler som skall användas för att kontrollera din Multirotot-modell.<br><br>Gas - Spektrum: CH1, Futaba: CH3<br>Yaw - Spektrum: CH4, Futaba: CH4<br>Pitch - Spektrum: CH3, Futaba: CH2<br>Roll - Spektrum: CH2, Futaba: CH1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<location line="+10"/>
|
||||
<source>There is no help available for the current page.</source>
|
||||
<translation>Det finns ingen hjälp tillgänglig för denna sida.</translation>
|
||||
</message>
|
||||
@@ -9123,7 +9169,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
||||
<context>
|
||||
<name>WizardPrinter</name>
|
||||
<message>
|
||||
<location line="+774"/>
|
||||
<location line="+795"/>
|
||||
<source>Model Name: </source>
|
||||
<translation>Modelnamn:</translation>
|
||||
</message>
|
||||
@@ -9133,7 +9179,20 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
||||
<translation>Modeltyp:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
<location line="+2"/>
|
||||
<source>Options: </source>
|
||||
<translation>Funktioner: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Options: [</source>
|
||||
<translation type="obsolete">Funktioner: [</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>]</source>
|
||||
<translation type="obsolete">]</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<source>Channel %1: </source>
|
||||
<translation>Kanal %1: </translation>
|
||||
</message>
|
||||
@@ -10007,7 +10066,7 @@ m2560 för v4.1-kort</translation>
|
||||
<message>
|
||||
<location line="+65"/>
|
||||
<source>Profile image %1 is invalid.</source>
|
||||
<translation>Profilbilden %1 är ogiltig</translation>
|
||||
<translation>Profilbilden %1 är ogiltig.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+16"/>
|
||||
|
||||
@@ -67,35 +67,61 @@ void WizMix::addMix(ModelData &model, Input input, int weight, int channel, int
|
||||
}
|
||||
else if (input==FLAPS_INPUT){
|
||||
// There ought to be some kind of constants for switches somewhere...
|
||||
maxMixSwitch((char *)"Flaps Up", model.mixData[mixIndex++], channel+1, isTaranis ? 1 :-3 , weight); //SA-UP or ELE-UP
|
||||
maxMixSwitch((char *)"Flaps Down", model.mixData[mixIndex++], channel+1, isTaranis ? 3 : 3 , -weight); //SA-DOWN or ELE-DOWN
|
||||
maxMixSwitch((char *)"Flaps Up", model.mixData[mixIndex++], channel+1, isTaranis ? 1 :-3 , weight); //Taranis SA-UP, 9X ELE-UP
|
||||
maxMixSwitch((char *)"Flaps Down", model.mixData[mixIndex++], channel+1, isTaranis ? 3 : 3 , -weight); //Taranis SA-DOWN, 9X ELE-DOWN
|
||||
|
||||
}
|
||||
else if (input==AIRBRAKES_INPUT){
|
||||
maxMixSwitch((char *)"Airbrk Off", model.mixData[mixIndex++], channel+1, isTaranis ? 13 :-2 , -weight); //SE-UP or RUD-UP
|
||||
maxMixSwitch((char *)"Airbrk On", model.mixData[mixIndex++], channel+1, isTaranis ? 15 : 2 , weight); //SE-DOWN or RUD-DOWN
|
||||
maxMixSwitch((char *)"Airbrk Off", model.mixData[mixIndex++], channel+1, isTaranis ? 13 :-2 , -weight); //Taranis SE-UP, 9X RUD-UP
|
||||
maxMixSwitch((char *)"Airbrk On", model.mixData[mixIndex++], channel+1, isTaranis ? 15 : 2 , weight); //Tatanis SE-DOWN, 9X RUD-DOWN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WizMix::operator ModelData()
|
||||
{
|
||||
int throttleChannel = -1;
|
||||
bool isTaranis = IS_TARANIS(GetEepromInterface()->getBoard());
|
||||
|
||||
ModelData model;
|
||||
model.used = true;
|
||||
model.modelId = modelId;
|
||||
model.setDefaultInputs(settings);
|
||||
|
||||
int mixIndex = 0;
|
||||
int switchIndex = 0;
|
||||
int timerIndex = 0;
|
||||
|
||||
// Safe copy model name
|
||||
strncpy(model.name, name, WIZ_MODEL_NAME_LENGTH);
|
||||
model.name[WIZ_MODEL_NAME_LENGTH] = 0;
|
||||
|
||||
int mixIndex = 0;
|
||||
// Add the channel mixes
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++ )
|
||||
{
|
||||
Channel ch = channel[i];
|
||||
if (ch.input1 == THROTTLE_INPUT || ch.input2 == THROTTLE_INPUT)
|
||||
throttleChannel = i;
|
||||
|
||||
addMix(model, ch.input1, ch.weight1, i, mixIndex);
|
||||
addMix(model, ch.input2, ch.weight2, i, mixIndex);
|
||||
}
|
||||
|
||||
// Add the Throttle Cut option
|
||||
if( options[THROTTLE_CUT_OPTION] && throttleChannel >=0 ){
|
||||
model.funcSw[switchIndex].swtch.type = SWITCH_TYPE_SWITCH;
|
||||
model.funcSw[switchIndex].swtch.index = isTaranis ? 16 : 1; // Taranis SF-UP, 9X THR-UP
|
||||
model.funcSw[switchIndex].enabled = 1;
|
||||
model.funcSw[switchIndex].func = (AssignFunc)throttleChannel;
|
||||
model.funcSw[switchIndex].param = -100;
|
||||
}
|
||||
|
||||
// Add the Throttle Timer option
|
||||
if (options[THROTTLE_TIMER_OPTION] && throttleChannel >=0 ){
|
||||
model.timers[timerIndex].mode.type = SWITCH_TYPE_SWITCH;
|
||||
model.timers[timerIndex].mode.index = isTaranis ? -16 : -1; // Taranis !SF-UP, 9X THR-DOWN
|
||||
timerIndex++;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "eeprominterface.h"
|
||||
|
||||
#define WIZ_MAX_CHANNELS 8
|
||||
|
||||
#define WIZ_MAX_OPTIONS 2
|
||||
// TODO use a constant common to the whole companion
|
||||
// TODO when in the wizard use the getCapacity(...) to know how long the name can be
|
||||
#define WIZ_MODEL_NAME_LENGTH 12
|
||||
@@ -40,6 +40,11 @@ enum Vehicle {
|
||||
HELICOPTER
|
||||
};
|
||||
|
||||
enum Options {
|
||||
THROTTLE_CUT_OPTION,
|
||||
THROTTLE_TIMER_OPTION
|
||||
};
|
||||
|
||||
enum WizardPage {
|
||||
Page_None = -1,
|
||||
Page_Models,
|
||||
@@ -60,6 +65,7 @@ enum WizardPage {
|
||||
Page_Fblheli,
|
||||
Page_Helictrl,
|
||||
Page_Multirotor,
|
||||
Page_Options,
|
||||
Page_Conclusion
|
||||
};
|
||||
|
||||
@@ -86,6 +92,7 @@ class WizMix
|
||||
const GeneralSettings & settings;
|
||||
Vehicle vehicle;
|
||||
Channel channel[WIZ_MAX_CHANNELS];
|
||||
bool options[WIZ_MAX_OPTIONS];
|
||||
|
||||
WizMix(const GeneralSettings & settings, const unsigned int modelId);
|
||||
operator ModelData();
|
||||
|
||||
@@ -32,17 +32,18 @@ WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelI
|
||||
setPage(Page_Flaps, new FlapsPage(this, "flaps",tr("Flaps"),tr("Has your model got flaps?"), Page_Airbrakes));
|
||||
setPage(Page_Airbrakes, new AirbrakesPage(this, "airbrakes",tr("Airbrakes"),tr("Has your model got airbrakes?"), Page_Tails));
|
||||
setPage(Page_Bank, new BankPage(this, "bank",tr("Flying-wing / Delta-wing"),tr("Are the elevons controlled by servos connected to separate channels or by a single servo channel?"), Page_Rudder));
|
||||
setPage(Page_Rudder, new RudderPage(this, "rudder",tr("Rudder"),tr("Does your model have a rudder?"), Page_Conclusion));
|
||||
setPage(Page_Rudder, new RudderPage(this, "rudder",tr("Rudder"),tr("Does your model have a rudder?"), Page_Options));
|
||||
setPage(Page_Tails, new TailSelectionPage(this, "tails",tr("Tail Type"),tr("Select which type of tail your model is equiped with.")));
|
||||
setPage(Page_Tail, new TailPage(this, "tail",tr("Tail"),tr("Select channels for tail control."), Page_Conclusion));
|
||||
setPage(Page_Vtail, new VTailPage(this, "vtail",tr("V-Tail"),tr("Select channels for tail control."), Page_Conclusion));
|
||||
setPage(Page_Simpletail, new SimpleTailPage(this, "simpletail",tr("Tail"),tr("Select elevator channel."), Page_Conclusion));
|
||||
setPage(Page_Tail, new TailPage(this, "tail",tr("Tail"),tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Vtail, new VTailPage(this, "vtail",tr("V-Tail"),tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Simpletail, new SimpleTailPage(this, "simpletail",tr("Tail"),tr("Select elevator channel."), Page_Options));
|
||||
setPage(Page_Cyclic, new CyclicPage(this, "cyclic",tr("Cyclic"),tr("Which type of swash control is installed in your helicopter?"), Page_Gyro));
|
||||
setPage(Page_Gyro, new GyroPage(this, "gyro",tr("Tail Gyro"),tr("Has your helicopter got an adjustable gyro for the tail?"), Page_Flybar));
|
||||
setPage(Page_Flybar, new FlybarSelectionPage(this, "flybar",tr("Rotor Type"),tr("Has your helicopter got a flybar?")));
|
||||
setPage(Page_Fblheli, new FblPage(this, "fblheli",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Conclusion));
|
||||
setPage(Page_Helictrl, new HeliPage(this, "helictrl",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Conclusion));
|
||||
setPage(Page_Multirotor, new MultirotorPage(this, "multirotor",tr("Multirotor"),tr("Select the control channels for your multirotor"), Page_Conclusion));
|
||||
setPage(Page_Fblheli, new FblPage(this, "fblheli",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Helictrl, new HeliPage(this, "helictrl",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Multirotor, new MultirotorPage(this, "multirotor",tr("Multirotor"),tr("Select the control channels for your multirotor"), Page_Options));
|
||||
setPage(Page_Options, new OptionsPage(this, "options",tr("Model Options"),tr("Select additional options"), Page_Conclusion));
|
||||
setPage(Page_Conclusion, new ConclusionPage(this, "conclusion",tr("Save Changes"),tr(
|
||||
"Manually check the direction of each control surface and reverse any channels that make controls move in the wrong direction. "
|
||||
"Remove the propeller/propellers before you try to control your model for the first time.<br>"
|
||||
@@ -117,6 +118,8 @@ void WizardDialog::showHelp()
|
||||
"Yaw - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Pitch - Spektrum: CH3, Futaba: CH2<br>"
|
||||
"Roll - Spektrum: CH2, Futaba: CH1"); break;
|
||||
case Page_Options:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Conclusion:
|
||||
message = tr("TBD."); break;
|
||||
default:
|
||||
@@ -832,6 +835,27 @@ bool MultirotorPage::validatePage() {
|
||||
bookChannel(rollCB, AILERONS_INPUT, 100 ));
|
||||
}
|
||||
|
||||
OptionsPage::OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Options, dlg, image, title, text, nextPage)
|
||||
{
|
||||
throttleCutRB = new QCheckBox(tr("Throttle Cut"));
|
||||
throttleTimerRB = new QCheckBox(tr("Throttle Timer"));
|
||||
|
||||
QLayout *l = layout();
|
||||
l->addWidget(throttleCutRB);
|
||||
l->addWidget(throttleTimerRB);
|
||||
}
|
||||
|
||||
void OptionsPage::initializePage(){
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool OptionsPage::validatePage(){
|
||||
wizDlg->mix.options[THROTTLE_CUT_OPTION] = throttleCutRB->isChecked();
|
||||
wizDlg->mix.options[THROTTLE_TIMER_OPTION] = throttleTimerRB->isChecked();
|
||||
return true;
|
||||
}
|
||||
|
||||
ConclusionPage::ConclusionPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Conclusion, dlg, image, title, text, nextPage)
|
||||
{
|
||||
@@ -840,8 +864,8 @@ ConclusionPage::ConclusionPage(WizardDialog *dlg, QString image, QString title,
|
||||
registerField("evaluate.proceed*", proceedCB);
|
||||
|
||||
QLayout *l = layout();
|
||||
l->addWidget(proceedCB);
|
||||
l->addWidget(textLabel);
|
||||
l->addWidget(proceedCB);
|
||||
}
|
||||
|
||||
void ConclusionPage::initializePage(){
|
||||
@@ -898,6 +922,16 @@ QString WizardPrinter::print()
|
||||
QString str;
|
||||
str = QString(tr("Model Name: ")) + mix->name + "\n";
|
||||
str += QString(tr("Model Type: ")) + vehicleName(mix->vehicle) + "\n";
|
||||
|
||||
str += QString(tr("Options: ")) + "[";
|
||||
for (int i=0; i<WIZ_MAX_OPTIONS; i++){
|
||||
if (mix->options[i])
|
||||
str += "X";
|
||||
else
|
||||
str += "-";
|
||||
}
|
||||
str += QString("]") + "\n";
|
||||
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++){
|
||||
if (mix->channel[i].page != Page_None) {
|
||||
Channel ch = mix->channel[i];
|
||||
|
||||
@@ -333,6 +333,18 @@ private:
|
||||
QComboBox *rollCB;
|
||||
};
|
||||
|
||||
class OptionsPage: public StandardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
private:
|
||||
QCheckBox *throttleCutRB;
|
||||
QCheckBox *throttleTimerRB;
|
||||
};
|
||||
|
||||
class ConclusionPage: public StandardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user