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 "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<LinkInterface *> linkList = LinkManager::instance()->getLinks() ;
for (int i = 0; i< linkList.size(); i++){
ui->cb_mavlinkLinks->addItem((linkList.takeFirst())->getName());
}
}
......@@ -2,9 +2,11 @@
#define SLUGSHILSIM_H
#include <QWidget>
#include <QHostAddress>
#include <QUdpSocket>
#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;
......
......@@ -53,7 +53,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<widget class="QLineEdit" name="ed_ipAdress">
<property name="minimumSize">
<size>
<width>60</width>
......@@ -99,7 +99,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit">
<widget class="QLineEdit" name="ed_rxPort">
<property name="minimumSize">
<size>
<width>60</width>
......@@ -132,7 +132,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_2">
<widget class="QLineEdit" name="ed_TxPort">
<property name="minimumSize">
<size>
<width>60</width>
......@@ -179,12 +179,12 @@
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Slugs HIL Sim Serial Port</string>
<string>Slugs HIL Sim Serial Link</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBox"/>
<widget class="QComboBox" name="cb_mavlinkLinks"/>
</item>
</layout>
</item>
......@@ -204,7 +204,7 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<widget class="QPushButton" name="bt_startHil">
<property name="text">
<string>Set in HIL Mode</string>
</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