diff --git a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml index 525df2b88..98bbd630e 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml +++ b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml @@ -916,7 +916,7 @@ false \home\lafargue\X-Plane 9\X-Plane-i686 \usr\share\games\FlightGear - true + true 100 false true @@ -952,7 +952,7 @@ false \usr\games\fgfs \usr\share\games\FlightGear - true + true 100 false true @@ -988,7 +988,7 @@ false \home\lafargue\X-Plane 9\X-Plane-i686 \usr\share\games\FlightGear - true + true 100 false true diff --git a/ground/openpilotgcs/src/plugins/hitl/hitlconfiguration.cpp b/ground/openpilotgcs/src/plugins/hitl/hitlconfiguration.cpp index c279acc28..ce09244cb 100644 --- a/ground/openpilotgcs/src/plugins/hitl/hitlconfiguration.cpp +++ b/ground/openpilotgcs/src/plugins/hitl/hitlconfiguration.cpp @@ -60,7 +60,7 @@ HITLConfiguration::HITLConfiguration(QString classId, QSettings* qSettings, QObj settings.groundTruthRate = 100; settings.inputCommand = false; - settings.gcsReciever = false; + settings.gcsReceiver = false; settings.manualControl = false; settings.manualOutput = false; settings.minOutputPeriod = 100; @@ -100,7 +100,7 @@ HITLConfiguration::HITLConfiguration(QString classId, QSettings* qSettings, QObj settings.groundTruthRate = qSettings->value("groundTruthRate").toInt(); settings.inputCommand = qSettings->value("inputCommand").toBool(); - settings.gcsReciever = qSettings->value("gcsReciever").toBool(); + settings.gcsReceiver = qSettings->value("gcsReceiver").toBool(); settings.manualControl = qSettings->value("manualControl").toBool(); settings.manualOutput = qSettings->value("manualOutput").toBool(); settings.minOutputPeriod = qSettings->value("minOutputPeriod").toInt(); @@ -148,7 +148,7 @@ void HITLConfiguration::saveConfig(QSettings* qSettings) const { qSettings->setValue("groundTruthEnabled", settings.groundTruthEnabled); qSettings->setValue("groundTruthRate", settings.groundTruthRate); qSettings->setValue("inputCommand", settings.inputCommand); - qSettings->setValue("gcsReciever", settings.gcsReciever); + qSettings->setValue("gcsReceiver", settings.gcsReceiver); qSettings->setValue("manualControl", settings.manualControl); qSettings->setValue("manualOutput", settings.manualOutput); qSettings->setValue("minOutputPeriod", settings.minOutputPeriod); diff --git a/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.cpp b/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.cpp index a930a178f..b4985edc0 100644 --- a/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.cpp +++ b/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.cpp @@ -78,7 +78,10 @@ QWidget *HITLOptionsPage::createPage(QWidget *parent) m_optionsPage->executablePath->setPath(config->Settings().binPath); m_optionsPage->dataPath->setPath(config->Settings().dataPath); - m_optionsPage->manualControl->setChecked(config->Settings().manualControl); + + m_optionsPage->manualControlRadioButton->setChecked(config->Settings().manualControl); + m_optionsPage->gcsReceiverRadioButton->setChecked(config->Settings().gcsReceiver); + m_optionsPage->startSim->setChecked(config->Settings().startSim); m_optionsPage->noiseCheckBox->setChecked(config->Settings().addNoise); @@ -105,6 +108,7 @@ QWidget *HITLOptionsPage::createPage(QWidget *parent) m_optionsPage->minOutputPeriodSpinbox->setValue(config->Settings().minOutputPeriod); + return optionsPageWidget; } @@ -116,7 +120,6 @@ void HITLOptionsPage::apply() settings.simulatorId = m_optionsPage->chooseFlightSimulator->itemData(i).toString(); settings.binPath = m_optionsPage->executablePath->path(); settings.dataPath = m_optionsPage->dataPath->path(); - settings.manualControl = m_optionsPage->manualControl->isChecked(); settings.startSim = m_optionsPage->startSim->isChecked(); settings.addNoise = m_optionsPage->noiseCheckBox->isChecked(); settings.hostAddress = m_optionsPage->hostAddress->text(); @@ -145,6 +148,8 @@ void HITLOptionsPage::apply() settings.minOutputPeriod = m_optionsPage->minOutputPeriodSpinbox->value(); + settings.manualControl = m_optionsPage->manualControlRadioButton->isChecked(); + settings.gcsReceiver = m_optionsPage->gcsReceiverRadioButton->isChecked(); config->setSimulatorSettings(settings); } diff --git a/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.ui b/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.ui index 3fc29aef9..fad510628 100644 --- a/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.ui +++ b/ground/openpilotgcs/src/plugins/hitl/hitloptionspage.ui @@ -529,7 +529,7 @@ - Refresh rate + Refresh rate: @@ -685,7 +685,7 @@ - Refresh rate + Refresh rate: @@ -750,7 +750,7 @@ true - Refresh rate + Refresh rate: @@ -867,7 +867,7 @@ - Range detectioon + Range detection: @@ -890,7 +890,7 @@ - Refresh rate + Refresh rate: @@ -927,7 +927,7 @@ true - Map command from simulator + Map command... true @@ -936,7 +936,7 @@ true - false + true @@ -952,7 +952,7 @@ 0 - + 75 @@ -960,7 +960,7 @@ - to GCSReciver + from simulator to hardware (via GCSReceiver) true @@ -968,12 +968,12 @@ - + - false + true - to ManualCtrl (not implemented) + from hardware to simulator (via ManualCtrl) @@ -991,7 +991,7 @@ true - Maximum output rate + Maximum GCS to hardware output rate: @@ -1001,7 +1001,7 @@ true - 0 - update once, or every N seconds + Set the maximum rate at which GCS sends simulator data to the hardware ms diff --git a/ground/openpilotgcs/src/plugins/hitl/simulator.cpp b/ground/openpilotgcs/src/plugins/hitl/simulator.cpp index 1f4dff90b..003799efb 100644 --- a/ground/openpilotgcs/src/plugins/hitl/simulator.cpp +++ b/ground/openpilotgcs/src/plugins/hitl/simulator.cpp @@ -565,7 +565,7 @@ void Simulator::updateUAVOs(Output2OP out){ } - if (settings.gcsReciever) { + if (settings.gcsReceiver) { // static QTime gcsRcvrTime = currentTime; // if (!settings.manualOutput || gcsRcvrTime.msecsTo(currentTime) >= settings.outputRate) { // GCSReceiver::DataFields gcsRcvrData; diff --git a/ground/openpilotgcs/src/plugins/hitl/simulator.h b/ground/openpilotgcs/src/plugins/hitl/simulator.h index 0d7e06c3e..7d08c870d 100644 --- a/ground/openpilotgcs/src/plugins/hitl/simulator.h +++ b/ground/openpilotgcs/src/plugins/hitl/simulator.h @@ -136,7 +136,7 @@ typedef struct _CONNECTION quint16 gpsPosRate; bool inputCommand; - bool gcsReciever; + bool gcsReceiver; bool manualControl; bool manualOutput; quint16 minOutputPeriod;