diff --git a/src/ui/slugshilsim.cc b/src/ui/slugshilsim.cc index 1d3c26c2991561f3f5cd850d06d70d32031d5c4a..8a8272d1e05edf04a505323ed53a8b31f5807906 100644 --- a/src/ui/slugshilsim.cc +++ b/src/ui/slugshilsim.cc @@ -1,14 +1,29 @@ #include "slugshilsim.h" #include "ui_slugshilsim.h" +#include "LinkManager.h" SlugsHilSim::SlugsHilSim(QWidget *parent) : QWidget(parent), ui(new Ui::SlugsHilSim) { ui->setupUi(this); + linkAdded(); + } SlugsHilSim::~SlugsHilSim() { delete ui; } + +void SlugsHilSim::linkAdded(void){ + + ui->cb_mavlinkLinks->clear(); + + QList linkList = LinkManager::instance()->getLinks() ; + + for (int i = 0; i< linkList.size(); i++){ + ui->cb_mavlinkLinks->addItem((linkList.takeFirst())->getName()); + } + +} diff --git a/src/ui/slugshilsim.h b/src/ui/slugshilsim.h index 345b32ef6222355590c7a5f0a9ef86ae982db879..57c4e56ac28f3d078d1a19b419f5b013f670c4f8 100644 --- a/src/ui/slugshilsim.h +++ b/src/ui/slugshilsim.h @@ -2,9 +2,11 @@ #define SLUGSHILSIM_H #include - +#include +#include #include "LinkInterface.h" + namespace Ui { class SlugsHilSim; } @@ -19,6 +21,11 @@ public: protected: LinkInterface* hilLink; + QHostAddress* simulinkIp; + QUdpSocket* txSocket; + QUdpSocket* rxSocket; + +slots: private: Ui::SlugsHilSim *ui; diff --git a/src/ui/slugshilsim.ui b/src/ui/slugshilsim.ui index e03075a5c001ee5e8d54a9d044152024f15dd37c..2281b4683f91c73f9d8599c4e8ac7c4e3ad52f29 100644 --- a/src/ui/slugshilsim.ui +++ b/src/ui/slugshilsim.ui @@ -53,7 +53,7 @@ - + 60 @@ -99,7 +99,7 @@ - + 60 @@ -132,7 +132,7 @@ - + 60 @@ -179,12 +179,12 @@ Qt::RightToLeft - Slugs HIL Sim Serial Port + Slugs HIL Sim Serial Link - + @@ -204,7 +204,7 @@ - + Set in HIL Mode