From b2410648ab75c6f168fa5bc413923ec9a6a932fe Mon Sep 17 00:00:00 2001 From: Mariano Lizarraga Date: Tue, 9 Nov 2010 13:02:04 -0600 Subject: [PATCH] Started workin on SLUGS HIL Sim --- qgroundcontrol.pro | 9 +- src/uas/SlugsMAV.cc | 2 +- src/ui/slugshilsim.cc | 14 +++ src/ui/slugshilsim.h | 22 +++++ src/ui/slugshilsim.ui | 219 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 262 insertions(+), 4 deletions(-) create mode 100644 src/ui/slugshilsim.cc create mode 100644 src/ui/slugshilsim.h create mode 100644 src/ui/slugshilsim.ui diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 6015ff895..2c359db28 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -136,7 +136,8 @@ FORMS += src/ui/MainWindow.ui \ src/ui/QGCDataPlot2D.ui \ src/ui/QGCRemoteControlView.ui \ src/ui/WaypointGlobalView.ui \ - src/ui/SlugsDataSensorView.ui + src/ui/SlugsDataSensorView.ui \ + src/ui/slugshilsim.ui INCLUDEPATH += src \ src/ui \ src/ui/linechart \ @@ -236,7 +237,8 @@ HEADERS += src/MG.h \ src/ui/map3D/WebImageCache.h \ src/ui/map3D/Imagery.h \ src/comm/QGCMAVLink.h\ - src/ui/SlugsDataSensorView.h + src/ui/SlugsDataSensorView.h \ + src/ui/slugshilsim.h SOURCES += src/main.cc \ src/Core.cc \ src/uas/UASManager.cc \ @@ -316,7 +318,8 @@ SOURCES += src/main.cc \ src/ui/map3D/WebImageCache.cc \ src/ui/map3D/WebImage.cc \ src/ui/map3D/Imagery.cc \ - src/ui/SlugsDataSensorView.cc + src/ui/SlugsDataSensorView.cc \ + src/ui/slugshilsim.cc RESOURCES = mavground.qrc diff --git a/src/uas/SlugsMAV.cc b/src/uas/SlugsMAV.cc index 56ed826aa..58132bcdd 100644 --- a/src/uas/SlugsMAV.cc +++ b/src/uas/SlugsMAV.cc @@ -30,7 +30,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) break; } -#ifdef MAVLINK_ENABLED_SLUGS_MESSAGES_QGC +#ifdef MAVLINK_ENABLED_SLUGS case MAVLINK_MSG_ID_CPU_LOAD: { diff --git a/src/ui/slugshilsim.cc b/src/ui/slugshilsim.cc new file mode 100644 index 000000000..1d3c26c29 --- /dev/null +++ b/src/ui/slugshilsim.cc @@ -0,0 +1,14 @@ +#include "slugshilsim.h" +#include "ui_slugshilsim.h" + +SlugsHilSim::SlugsHilSim(QWidget *parent) : + QWidget(parent), + ui(new Ui::SlugsHilSim) +{ + ui->setupUi(this); +} + +SlugsHilSim::~SlugsHilSim() +{ + delete ui; +} diff --git a/src/ui/slugshilsim.h b/src/ui/slugshilsim.h new file mode 100644 index 000000000..bfeb242c0 --- /dev/null +++ b/src/ui/slugshilsim.h @@ -0,0 +1,22 @@ +#ifndef SLUGSHILSIM_H +#define SLUGSHILSIM_H + +#include + +namespace Ui { + class SlugsHilSim; +} + +class SlugsHilSim : public QWidget +{ + Q_OBJECT + +public: + explicit SlugsHilSim(QWidget *parent = 0); + ~SlugsHilSim(); + +private: + Ui::SlugsHilSim *ui; +}; + +#endif // SLUGSHILSIM_H diff --git a/src/ui/slugshilsim.ui b/src/ui/slugshilsim.ui new file mode 100644 index 000000000..e03075a5c --- /dev/null +++ b/src/ui/slugshilsim.ui @@ -0,0 +1,219 @@ + + + SlugsHilSim + + + + 0 + 0 + 256 + 191 + + + + + 256 + 191 + + + + + 367 + 229 + + + + + 10 + + + + Form + + + + + + + + + + + 10 + 75 + true + + + + Qt::RightToLeft + + + IP Address + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + + 10 + 75 + true + + + + Qt::RightToLeft + + + Receive Port + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + + + + + 10 + 75 + true + + + + Qt::RightToLeft + + + Send Port + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 10 + 75 + true + + + + Qt::RightToLeft + + + Slugs HIL Sim Serial Port + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Set in HIL Mode + + + + + + + + + + -- 2.22.0