A couple of other fixes

This commit is contained in:
Bertrand Songis
2014-01-20 13:47:42 +01:00
parent a3e4591144
commit 1a00145b1d
4 changed files with 10 additions and 9 deletions
-1
View File
@@ -996,7 +996,6 @@ enum Capability {
HasStickScroll, HasStickScroll,
HasSoundMixer, HasSoundMixer,
NumModules, NumModules,
FSSwitch,
PPMCenter, PPMCenter,
SYMLimits, SYMLimits,
HasCurrentCalibration, HasCurrentCalibration,
@@ -602,8 +602,6 @@ int Open9xInterface::getCapability(const Capability capability)
return 1; return 1;
case DSM2Indexes: case DSM2Indexes:
return 1; return 1;
case FSSwitch:
return 1;
case MixesWithoutExpo: case MixesWithoutExpo:
return 1; return 1;
case NumCurves: case NumCurves:
+2
View File
@@ -62,6 +62,8 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
ui->trimCB->hide(); ui->trimCB->hide();
} }
ui->trimCB->setCurrentIndex(1 - ed->carryTrim);
int expolength = GetEepromInterface()->getCapability(HasExpoNames); int expolength = GetEepromInterface()->getCapability(HasExpoNames);
if (!expolength) { if (!expolength) {
ui->lineNameLabel->hide(); ui->lineNameLabel->hide();
+8 -6
View File
@@ -45,14 +45,19 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) :
ui->trimCB->addItem(tr("Thr"), 3); ui->trimCB->addItem(tr("Thr"), 3);
ui->trimCB->addItem(tr("Ail"), 4); ui->trimCB->addItem(tr("Ail"), 4);
ui->trimCB->setCurrentIndex((-md->carryTrim)+1); ui->trimCB->setCurrentIndex(1 - md->carryTrim);
int namelength=GetEepromInterface()->getCapability(HasMixerNames);
int namelength = GetEepromInterface()->getCapability(HasMixerNames);
if (!namelength) { if (!namelength) {
ui->label_name->hide(); ui->label_name->hide();
ui->mixerName->hide(); ui->mixerName->hide();
} else { }
else {
ui->mixerName->setMaxLength(namelength); ui->mixerName->setMaxLength(namelength);
} }
ui->mixerName->setValidator(new QRegExpValidator(rx, this));
ui->mixerName->setText(md->name);
if (!GetEepromInterface()->getCapability(FlightPhases)) { if (!GetEepromInterface()->getCapability(FlightPhases)) {
ui->label_phases->hide(); ui->label_phases->hide();
for (int i=0; i<9; i++) { for (int i=0; i<9; i++) {
@@ -74,9 +79,6 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) :
} }
} }
ui->mixerName->setValidator(new QRegExpValidator(rx, this));
ui->mixerName->setText(md->name);
populateSwitchCB(ui->switchesCB,md->swtch); populateSwitchCB(ui->switchesCB,md->swtch);
ui->warningCB->setCurrentIndex(md->mixWarn); ui->warningCB->setCurrentIndex(md->mixWarn);
ui->mltpxCB->setCurrentIndex(md->mltpx); ui->mltpxCB->setCurrentIndex(md->mltpx);