diff --git a/companion/src/constants.h b/companion/src/constants.h index 18741f6f8..c736e5360 100644 --- a/companion/src/constants.h +++ b/companion/src/constants.h @@ -62,9 +62,9 @@ enum BoardEnum { #define HEX_FILES_FILTER "HEX files (*.hex);;" #define BIN_FILES_FILTER "BIN files (*.bin);;" #define DFU_FILES_FILTER "DFU files (*.dfu);;" -#define EEPE_FILES_FILTER "EEPE EEPROM files (*.eepe);;" +#define EEPE_FILES_FILTER "EEPE files (*.eepe);;" #define OTX_FILES_FILTER "OpenTX files (*.otx);;" -#define EEPROM_FILES_FILTER "EEPE files (*.eepe *.bin *.hex);;" EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER +#define EEPROM_FILES_FILTER "Radio and Models settings files (*.otx *.eepe *.bin *.hex);;" OTX_FILES_FILTER EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER #define FLASH_FILES_FILTER "FLASH files (*.bin *.hex *.dfu);;" BIN_FILES_FILTER HEX_FILES_FILTER DFU_FILES_FILTER #define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER #define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE" @@ -76,10 +76,4 @@ const char * const ARROW_UP = "\xE2\x86\x91"; const char * const ARROW_RIGHT = "\xE2\x86\x92"; const char * const ARROW_DOWN = "\xE2\x86\x93"; -#if defined(DEBUG) -#define HORUS_READY_FOR_RELEASE() true -#else -#define HORUS_READY_FOR_RELEASE() false -#endif - #endif // _CONSTANTS_H_ diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 64ef128f2..fd1427d10 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -836,7 +836,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx) BoardEnum board = GetCurrentFirmware()->getBoard(); SimulatorDialog * dialog; - if (board == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) { + if (board == BOARD_HORUS) { dialog = new SimulatorDialogHorus(parent, simulator, flags); QTemporaryDir tmpDir(QDir::tempPath() + "/otx-XXXXXX"); settingsPath = tmpDir.path(); diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index b72f59cca..81f291355 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -560,12 +560,7 @@ void MainWindow::openDocURL() void MainWindow::openFile() { QString fileFilter; - if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) { - fileFilter = tr(OTX_FILES_FILTER); - } - else { - fileFilter = tr(EEPROM_FILES_FILTER); - } + fileFilter = tr(EEPROM_FILES_FILTER); QString fileName = QFileDialog::getOpenFileName(this, tr("Open Models and Settings file"), g.eepromDir(), fileFilter); if (!fileName.isEmpty()) { g.eepromDir(QFileInfo(fileName).dir().absolutePath()); @@ -755,8 +750,8 @@ void MainWindow::loadBackup() void MainWindow::readEeprom() { - if (GetCurrentFirmware()->getBoard()== BOARD_HORUS && HORUS_READY_FOR_RELEASE()) { - // TODO + if (GetCurrentFirmware()->getBoard()== BOARD_HORUS) { + qDebug() << "TODO readEEPROM HORUS"; } else { QString tempFile; @@ -907,36 +902,20 @@ void MainWindow::updateMenus() { bool hasMdiChild = (activeMdiChild() != 0); bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection()); - - if(GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) { - newAct->setEnabled(false); - openAct->setEnabled(false); - saveAct->setEnabled(false); - saveAsAct->setEnabled(false); - writeEepromAct->setEnabled(false); - readEepromAct->setEnabled(false); - writeBackupToRadioAct->setEnabled(false); - readBackupToFileAct->setEnabled(false); - cutAct->setEnabled(false); - copyAct->setEnabled(false); - pasteAct->setEnabled(false); - for (int i=0; isetEnabled(false); - } else { - newAct->setEnabled(true); - openAct->setEnabled(true); - saveAct->setEnabled(hasMdiChild); - saveAsAct->setEnabled(hasMdiChild); - cutAct->setEnabled(hasSelection); - copyAct->setEnabled(hasSelection); - pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false); - writeEepromAct->setEnabled(hasMdiChild); - readEepromAct->setEnabled(true); - writeBackupToRadioAct->setEnabled(true); - readBackupToFileAct->setEnabled(true); - for (int i=0; isetEnabled(true); - } + + newAct->setEnabled(true); + openAct->setEnabled(true); + saveAct->setEnabled(hasMdiChild); + saveAsAct->setEnabled(hasMdiChild); + cutAct->setEnabled(hasSelection); + copyAct->setEnabled(hasSelection); + pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false); + writeEepromAct->setEnabled(hasMdiChild); + readEepromAct->setEnabled(true); + writeBackupToRadioAct->setEnabled(true); + readBackupToFileAct->setEnabled(true); + for (int i=0; isetEnabled(true); separatorAct->setVisible(hasMdiChild); simulateAct->setEnabled(hasSelection); printAct->setEnabled(hasSelection); diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index 974f51607..2a820a732 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -94,12 +94,7 @@ void MdiChild::refresh(bool expand) if (1 || expand) { ui->modelsList->expandAll(); } - if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) { - ui->simulateButton->setEnabled(false); - } - else { - ui->simulateButton->setEnabled(GetCurrentFirmware()->getCapability(Simulation)); - } + ui->simulateButton->setEnabled(GetCurrentFirmware()->getCapability(Simulation)); updateTitle(); } diff --git a/companion/src/modeledit/modeledit.cpp b/companion/src/modeledit/modeledit.cpp index 4a32c560d..8edae5a27 100644 --- a/companion/src/modeledit/modeledit.cpp +++ b/companion/src/modeledit/modeledit.cpp @@ -49,9 +49,6 @@ ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmw setWindowIcon(CompanionIcon("edit.png")); restoreGeometry(g.modelEditGeo()); ui->pushButton->setIcon(CompanionIcon("simulate.png")); - if(GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) { - ui->pushButton->setEnabled(false); - } SetupPanel * setupPanel = new SetupPanel(this, model, generalSettings, firmware); addTab(setupPanel, tr("Setup")); if (firmware->getCapability(Heli)) @@ -110,12 +107,7 @@ void ModelEdit::on_tabWidget_currentChanged(int index) void ModelEdit::on_pushButton_clicked() { - if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) { - QMessageBox::warning(this, "Unavailable", "Horus simulation not currently supported within Companion"); - } - else { - launchSimulation(); - } + launchSimulation(); } void ModelEdit::launchSimulation()