Commit 91f2d433 authored by Mariano Lizarraga's avatar Mariano Lizarraga

Started populating the Combobox in HIL sim with the available Links

parent effe7af2
#include "slugshilsim.h" #include "slugshilsim.h"
#include "ui_slugshilsim.h" #include "ui_slugshilsim.h"
#include "LinkManager.h"
SlugsHilSim::SlugsHilSim(QWidget *parent) : SlugsHilSim::SlugsHilSim(QWidget *parent) :
QWidget(parent), QWidget(parent),
ui(new Ui::SlugsHilSim) ui(new Ui::SlugsHilSim)
{ {
ui->setupUi(this); ui->setupUi(this);
linkAdded();
} }
SlugsHilSim::~SlugsHilSim() SlugsHilSim::~SlugsHilSim()
{ {
delete ui; delete ui;
} }
void SlugsHilSim::linkAdded(void){
ui->cb_mavlinkLinks->clear();
QList<LinkInterface *> linkList = LinkManager::instance()->getLinks() ;
for (int i = 0; i< linkList.size(); i++){
ui->cb_mavlinkLinks->addItem((linkList.takeFirst())->getName());
}
}
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
#define SLUGSHILSIM_H #define SLUGSHILSIM_H
#include <QWidget> #include <QWidget>
#include <QHostAddress>
#include <QUdpSocket>
#include "LinkInterface.h" #include "LinkInterface.h"
namespace Ui { namespace Ui {
class SlugsHilSim; class SlugsHilSim;
} }
...@@ -19,6 +21,11 @@ public: ...@@ -19,6 +21,11 @@ public:
protected: protected:
LinkInterface* hilLink; LinkInterface* hilLink;
QHostAddress* simulinkIp;
QUdpSocket* txSocket;
QUdpSocket* rxSocket;
slots:
private: private:
Ui::SlugsHilSim *ui; Ui::SlugsHilSim *ui;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_3"> <widget class="QLineEdit" name="ed_ipAdress">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>60</width> <width>60</width>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLineEdit" name="lineEdit"> <widget class="QLineEdit" name="ed_rxPort">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>60</width> <width>60</width>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_2"> <widget class="QLineEdit" name="ed_TxPort">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>60</width> <width>60</width>
...@@ -179,12 +179,12 @@ ...@@ -179,12 +179,12 @@
<enum>Qt::RightToLeft</enum> <enum>Qt::RightToLeft</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Slugs HIL Sim Serial Port</string> <string>Slugs HIL Sim Serial Link</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="comboBox"/> <widget class="QComboBox" name="cb_mavlinkLinks"/>
</item> </item>
</layout> </layout>
</item> </item>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="bt_startHil">
<property name="text"> <property name="text">
<string>Set in HIL Mode</string> <string>Set in HIL Mode</string>
</property> </property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment