Skip to content
Snippets Groups Projects
Commit 6d171c32 authored by ucart's avatar ucart
Browse files

Adding GUI.m (Matlab plotting) functionality as background process to mainwindow of groundstation

parent f6dae57f
No related branches found
No related tags found
No related merge requests found
#------------------------------------------------- #-------------------------------------------------
# #
# Project created by QtCreator 2017-02-23T15:03:45 # Project created by QtCreator 2017-02-23T15:03:45
# #
#------------------------------------------------- #-------------------------------------------------
QT += core gui QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = MicroCART TARGET = MicroCART
TEMPLATE = app TEMPLATE = app
LIBS += ../../frontend.a LIBS += ../../frontend.a
INCLUDEPATH += ../../src/frontend/ INCLUDEPATH += ../../src/frontend/
SOURCES += main.cpp\ SOURCES += main.cpp\
mainwindow.cpp \ mainwindow.cpp \
trackerworker.cpp \ trackerworker.cpp \
controlworker.cpp \ controlworker.cpp \
quaditem.cpp \ quaditem.cpp \
slotprocess.cpp \ slotprocess.cpp \
qFlightInstruments.cpp qFlightInstruments.cpp
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
trackerworker.h \ trackerworker.h \
controlworker.h \ controlworker.h \
quaditem.h \ quaditem.h \
slotprocess.h \ slotprocess.h \
qFlightInstruments.h graph_blocks.h \
qFlightInstruments.h
FORMS += mainwindow.ui
FORMS += mainwindow.ui
INCLUDEPATH += $$PWD/../../../quad/inc
DEPENDPATH += $$PWD/../../../quad/inc INCLUDEPATH += $$PWD/../../../quad/inc
DEPENDPATH += $$PWD/../../../quad/inc
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../quad/lib/release/ -lgraph_blocks
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../quad/lib/debug/ -lgraph_blocks win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../quad/lib/release/ -lgraph_blocks
else:unix: LIBS += -L$$PWD/../../../quad/lib/ -lgraph_blocks else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../quad/lib/debug/ -lgraph_blocks
else:unix: LIBS += -L$$PWD/../../../quad/lib/ -lgraph_blocks
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/libgraph_blocks.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/libgraph_blocks.a win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/libgraph_blocks.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/graph_blocks.lib else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/libgraph_blocks.a
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/graph_blocks.lib else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/graph_blocks.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../quad/lib/libgraph_blocks.a else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/graph_blocks.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../quad/lib/libgraph_blocks.a
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../quad/lib/release/ -lcomputation_graph
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../quad/lib/debug/ -lcomputation_graph win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../quad/lib/release/ -lcomputation_graph
else:unix: LIBS += -L$$PWD/../../../quad/lib/ -lcomputation_graph else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../quad/lib/debug/ -lcomputation_graph
else:unix: LIBS += -L$$PWD/../../../quad/lib/ -lcomputation_graph
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/libcomputation_graph.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/libcomputation_graph.a win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/libcomputation_graph.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/computation_graph.lib else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/libcomputation_graph.a
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/computation_graph.lib else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/release/computation_graph.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../quad/lib/libcomputation_graph.a else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../quad/lib/debug/computation_graph.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../quad/lib/libcomputation_graph.a
RESOURCES += \
resources.qrc RESOURCES += \
resources.qrc
This diff is collapsed.
#ifndef MAINWINDOW_H #ifndef MAINWINDOW_H
#define MAINWINDOW_H #define MAINWINDOW_H
#include <QMainWindow> #include <QMainWindow>
#include <QStringList> #include <QStringList>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QGraphicsScene> #include <QGraphicsScene>
#include "quaditem.h" #include "quaditem.h"
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
} }
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit MainWindow(QWidget *parent = 0); explicit MainWindow(QWidget *parent = 0);
~MainWindow(); ~MainWindow();
signals: signals:
void connectWorkers(); void connectWorkers();
void disconnectWorkers(); void disconnectWorkers();
void getParamValue(QString node, QString param); void getParamValue(QString node, QString param);
void getNodeOutput(QString node); void getNodeOutput(QString node);
void setParamValue(QString node, QString param, float value); void setParamValue(QString node, QString param, float value);
void getPosAttFromBackend(); void getPosAttFromBackend();
private slots: private slots:
void on_pbStart_clicked(); void on_pbStart_clicked();
void on_pbConnect_clicked(); void on_pbConnect_clicked();
void on_pbStop_clicked(); void on_pbStop_clicked();
void on_chooseBackend_clicked(); void on_chooseBackend_clicked();
void updateTracker(float x, float y, float z, float p, float r, float yaw); void updateTracker(float x, float y, float z, float p, float r, float yaw);
void updatePosAtt(); void updatePosAtt();
void newNodes(QStringList blocks); void newNodes(QStringList blocks);
void newParams(QStringList params); void newParams(QStringList params);
void newParamValue(QString node, QString param, float val); void newParamValue(QString node, QString param, float val);
void newNodeOutput(QString node, float output); void newNodeOutput(QString node, float output);
void newConstantBlocks(QStringList blocks); void newConstantBlocks(QStringList blocks);
void newControlGraph(QString graph); void newControlGraph(QString graph);
void on_paramSelect_currentIndexChanged(const QString &arg1); void on_paramSelect_currentIndexChanged(const QString &arg1);
void on_paramValue_returnPressed(); void on_paramValue_returnPressed();
void on_pbAppendSetpoint_clicked(); void on_pbAppendSetpoint_clicked();
void on_pbNextSetpoint_clicked(); void on_pbNextSetpoint_clicked();
void sendSetpoints(); void sendSetpoints();
void sendSelectedSetpoint(); void sendSelectedSetpoint();
void on_pbActualToSetpoint_clicked(); void on_pbActualToSetpoint_clicked();
void on_pbDeleteSetpoint_clicked(); void on_pbDeleteSetpoint_clicked();
void on_pbActualToWaypoint_clicked(); void on_pbActualToWaypoint_clicked();
void on_pbMoveUp_clicked(); void on_pbMoveUp_clicked();
void on_pbMoveDown_clicked(); void on_pbMoveDown_clicked();
void on_pbInsertSetpoint_clicked(); void on_pbInsertSetpoint_clicked();
void on_pbSaveWaypoints_clicked(); void on_pbSaveWaypoints_clicked();
void on_pbLoadWaypoints_clicked(); void on_pbLoadWaypoints_clicked();
void on_xSetpoint_returnPressed(); void on_xSetpoint_returnPressed();
void on_ySetpoint_returnPressed(); void on_run_data_analysis_button_clicked();
void on_zSetpoint_returnPressed(); void on_ySetpoint_returnPressed();
void on_posattSrcVrpn_clicked(); void on_zSetpoint_returnPressed();
void on_posattSrcQuad_clicked(); void on_posattSrcVrpn_clicked();
void on_yawSetpoint_returnPressed(); void on_posattSrcQuad_clicked();
void backendStarted(); void on_yawSetpoint_returnPressed();
void backendFinished(int exitCode, QProcess::ExitStatus exitStatus);
void backendError(QProcess::ProcessError error); void backendStarted();
void backendRead(); void connectMatlab();
void workerConnected(); void backendFinished(int exitCode, QProcess::ExitStatus exitStatus);
void workerDisconnected(); void backendError(QProcess::ProcessError error);
void backendRead();
private: void workerConnected();
Ui::MainWindow *ui; void workerDisconnected();
QStandardItemModel * setpointList;
QTimer * nextSpTimer; private:
float sp_x; Ui::MainWindow *ui;
float sp_y; QStandardItemModel * setpointList;
float sp_z; QTimer * nextSpTimer;
QTimer * trackerTimer; float sp_x;
QTimer * workerStartTimer; float sp_y;
QProcess * backendProcess; float sp_z;
int connectedWorkers; QTimer * trackerTimer;
}; QTimer * workerStartTimer;
QProcess * backendProcess;
#endif // MAINWINDOW_H QProcess * matlabProcess;
int connectedWorkers;
};
#endif // MAINWINDOW_H
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment