Refactoring

This commit is contained in:
bsongis
2014-05-27 15:17:39 +02:00
parent 5620a76679
commit fdde364307
11 changed files with 53 additions and 26 deletions
+2 -5
View File
@@ -16,7 +16,6 @@ SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags):
dialP_4(NULL),
timer(NULL),
lightOn(false),
txInterface(NULL),
simulator(NULL),
lastPhase(-1),
beepVal(0),
@@ -340,9 +339,7 @@ void SimulatorDialog::initUi(T * ui)
}
#endif
txInterface = GetEepromInterface();
windowName = tr("Simulating Radio (%1)").arg(txInterface->getName());
windowName = tr("Simulating Radio (%1)").arg(GetCurrentFirmware()->getName());
setWindowTitle(windowName);
simulator = GetCurrentFirmware()->getSimulator();
@@ -493,7 +490,7 @@ void SimulatorDialog::onTimerEvent()
{
static unsigned int lcd_counter = 0;
if (!simulator->timer10ms()) {
QMessageBox::critical(this, "Companion", tr("Firmware %1 error: %2").arg(txInterface->getName()).arg(simulator->getError()));
QMessageBox::critical(this, "Companion", tr("Firmware %1 error: %2").arg(GetCurrentFirmware()->getName()).arg(simulator->getError()));
timer->stop();
return;
}