Merge branch 'origin/next'
This commit is contained in:
@@ -896,7 +896,12 @@ class ExpoField: public TransformedField {
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
expo.weight = smallGvarToC9x(_weight);
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
}
|
||||
|
||||
expo.weight = smallGvarToC9x(_weight);
|
||||
|
||||
if (!IS_TARANIS(board) || version < 216) {
|
||||
if (!_curveMode)
|
||||
expo.curve = CurveReference(CurveReference::CURVE_REF_EXPO, smallGvarToC9x(_curveParam));
|
||||
|
||||
@@ -521,12 +521,14 @@ void MdiChild::writeEeprom() // write to Tx
|
||||
if (path.isEmpty()) {
|
||||
QMessageBox::warning(this, tr("Taranis radio not found"), tr("Impossible to identify the radio on your system, please verify the eeprom disk is connected."));
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
QStringList str;
|
||||
str << path << backupFile;
|
||||
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup EEPROM From Tx")); //, AVR_DIALOG_KEEP_OPEN);
|
||||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
@@ -549,10 +551,9 @@ void MdiChild::writeEeprom() // write to Tx
|
||||
sleep(1);
|
||||
QString restoreFile = tempDir + "/compat.bin";
|
||||
if (!((MainWindow *)this->parent())->convertEEPROM(tempFile, restoreFile, tempFlash)) {
|
||||
int ret = QMessageBox::question(this, "Error", tr("Cannot check eeprom compatibility! Continue anyway?") ,
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret==QMessageBox::No)
|
||||
return;
|
||||
int ret = QMessageBox::question(this, tr("Error"), tr("Cannot check eeprom compatibility! Continue anyway?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret == QMessageBox::No)
|
||||
return;
|
||||
}
|
||||
else {
|
||||
int rev=((MainWindow *)this->parent())->getEpromVersion(restoreFile);
|
||||
@@ -591,6 +592,7 @@ void MdiChild::writeEeprom() // write to Tx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
QString path=((MainWindow *)this->parent())->FindTaranisPath();
|
||||
if (path.isEmpty()) {
|
||||
@@ -602,7 +604,7 @@ void MdiChild::writeEeprom() // write to Tx
|
||||
str << tempFile << path;
|
||||
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write EEPROM To Tx"), AVR_DIALOG_SHOW_DONE); //, AVR_DIALOG_KEEP_OPEN);
|
||||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
||||
ad->show();
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
}
|
||||
@@ -611,7 +613,7 @@ void MdiChild::writeEeprom() // write to Tx
|
||||
QStringList str = ((MainWindow *)this->parent())->GetSendEEpromCommand(tempFile);
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, "Write EEPROM To Tx", AVR_DIALOG_SHOW_DONE);
|
||||
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
|
||||
ad->show();
|
||||
ad->exec();
|
||||
delete ad;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,8 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
|
||||
|
||||
#ifdef PHONON
|
||||
playBT[i] = new QPushButton(this);
|
||||
playBT[i]->setObjectName(QString("play_%1").arg(i));
|
||||
playBT[i]->setProperty("index", i);
|
||||
playBT[i]->setProperty("state", "play");
|
||||
playBT[i]->setIcon(CompanionIcon("play.png"));
|
||||
paramLayout->addWidget(playBT[i]);
|
||||
connect(playBT[i], SIGNAL(pressed()), this, SLOT(playMusic()));
|
||||
@@ -222,42 +223,43 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta
|
||||
|
||||
void CustomFunctionsPanel::playMusic()
|
||||
{
|
||||
QPushButton *playButton = qobject_cast<QPushButton*>(sender());
|
||||
int index=playButton->objectName().mid(5,2).toInt();
|
||||
QString function=playButton->objectName().left(4);
|
||||
QString path = g.profile[g.id()].sdPath();
|
||||
QPushButton * button = qobject_cast<QPushButton*>(sender());
|
||||
int index = button->property("index").toInt();
|
||||
QString function = button->property("state").toString();
|
||||
QString path = g.profile[g.id()].sdPath();
|
||||
QDir qd(path);
|
||||
QString track;
|
||||
if (qd.exists()) {
|
||||
if (GetEepromInterface()->getCapability(VoicesAsNumbers)) {
|
||||
track=path+QString("/%1.wav").arg(int(fswtchParam[index]->value()),4,10,(const QChar)'0');
|
||||
track = path + QString("/%1.wav").arg(int(fswtchParam[index]->value()), 4, 10, (const QChar)'0');
|
||||
}
|
||||
else {
|
||||
path.append("/SOUNDS/");
|
||||
QString lang = generalSettings.ttsLanguage;
|
||||
if (lang.isEmpty())
|
||||
lang="en";
|
||||
lang = "en";
|
||||
path.append(lang);
|
||||
if (fswtchParamArmT[index]->currentText()!="----") {
|
||||
track=path+"/"+fswtchParamArmT[index]->currentText()+".wav";
|
||||
if (fswtchParamArmT[index]->currentText() != "----") {
|
||||
track = path + "/" + fswtchParamArmT[index]->currentText() + ".wav";
|
||||
}
|
||||
}
|
||||
QFile file(track);
|
||||
if (!file.exists()) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("Unable to find sound file %1!").arg(track));
|
||||
track.clear();
|
||||
return;
|
||||
}
|
||||
#ifdef PHONON
|
||||
if (function=="play" && !track.isEmpty()) {
|
||||
if (function=="play") {
|
||||
clickObject->clear();
|
||||
clickObject->setCurrentSource(Phonon::MediaSource(track));
|
||||
clickObject->play();
|
||||
playBT[index]->setObjectName(QString("stop_%1").arg(index));
|
||||
playBT[index]->setProperty("state", "stop");
|
||||
playBT[index]->setIcon(CompanionIcon("stop.png"));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
clickObject->stop();
|
||||
clickObject->clear();
|
||||
playBT[index]->setObjectName(QString("play_%1").arg(index));
|
||||
playBT[index]->setProperty("state", "play");
|
||||
playBT[index]->setIcon(CompanionIcon("play.png"));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,10 @@ void InputsPanel::update()
|
||||
curDest = md->chn;
|
||||
}
|
||||
else {
|
||||
str = " ";
|
||||
if (GetEepromInterface()->getCapability(VirtualInputs))
|
||||
str = " ";
|
||||
else
|
||||
str = " ";
|
||||
}
|
||||
|
||||
if (GetEepromInterface()->getCapability(VirtualInputs)) {
|
||||
|
||||
@@ -476,7 +476,7 @@ void Setup::on_extendedLimits_toggled(bool checked)
|
||||
|
||||
void Setup::on_throttleWarning_toggled(bool checked)
|
||||
{
|
||||
model.disableThrottleWarning = checked;
|
||||
model.disableThrottleWarning = !checked;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ void Setup::update()
|
||||
|
||||
ui->throttleReverse->setChecked(model.throttleReversed);
|
||||
populateTTraceCB(ui->throttleSource, model.thrTraceSrc);
|
||||
ui->throttleWarning->setChecked(model.disableThrottleWarning);
|
||||
ui->throttleWarning->setChecked(!model.disableThrottleWarning);
|
||||
|
||||
//trim inc, thro trim, thro expo, instatrim
|
||||
ui->trimIncrement->setCurrentIndex(model.trimInc+2);
|
||||
|
||||
+2272
-3366
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user