diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 8ecf55f12..eb594b9b6 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -435,6 +435,23 @@ static bool caseInsensitiveLessThan(const QString &s1, const QString &s2) return s1.toLower() < s2.toLower(); } +bool displayT16ImportWarning() +{ + QMessageBox msgBox; + msgBox.setWindowTitle(QObject::tr("WARNING")); + msgBox.setText(QObject::tr("
Importing JumperTX data into OpenTX 2.3 is not supported and dangerous.
\ +It is unfortunately not possible for us to differentiate JumperTX data from legitimate FrSky X10 data, but You should only continue here if the file you opened comes from a real FrSky X10.
\ +Do you really want to continue?
")); + msgBox.setIcon(QMessageBox::Warning); + msgBox.addButton(QMessageBox::No); + msgBox.addButton(QMessageBox::Yes); + msgBox.setDefaultButton(QMessageBox::No); + + if (msgBox.exec() == QMessageBox::No) + return false; + return true; +} + void Helpers::populateFileComboBox(QComboBox * b, const QSetDue to the way Jumper have handled their JumperTX fork and firmware releases data integrity for settings from JumperTX cannot be trusted when migrating to OpenTX.
\ -Importing JumperTX data into OpenTX 2.3 is not supported and dangerous.
\ -It is unfortunately not possible for us to differentiate JumperTX data from legitimate FrSky X10 data, but You should only continue here if the file you opened comes from a real FrSky X10.
\ -Do you really want to continue?
")); - msgBox.setIcon(QMessageBox::Warning); - msgBox.addButton(QMessageBox::No); - msgBox.addButton(QMessageBox::Yes); - msgBox.setDefaultButton(QMessageBox::No); - - if (msgBox.exec() == QMessageBox::No) + if (displayT16ImportWarning() == false) return false; } diff --git a/companion/src/radiointerface.cpp b/companion/src/radiointerface.cpp index d83f40c5c..63befdd0c 100644 --- a/companion/src/radiointerface.cpp +++ b/companion/src/radiointerface.cpp @@ -333,6 +333,11 @@ bool readEeprom(const QString & filename, ProgressWidget * progress) QMessageBox::critical(progress, CPN_STR_TTL_ERROR, outputStorage.error()); return false; } + + if (getCurrentBoard() == Board::BOARD_JUMPER_T16 && inputStorage.getBoard() == Board::BOARD_X10) { + if (displayT16ImportWarning() == false) + return false; + } } else { if (IS_ARM(board)) {