-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (42 loc) · 1.29 KB
/
Copy pathmain.cpp
File metadata and controls
51 lines (42 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Including necessary headers
#include "mainwindow.h"
#include <QApplication>
#include "udp.h"
#include "loggingthread.h"
#include <QCoreApplication>
// Using standard namespace
using namespace std;
// Global variables declaration
int global_log = 0;
int startlog_gui = 0;
QVector<double> qv_counter(600);
int log_start = 0;
QVector<double> qv_xValues(600);
QVector<double> qv_yValues(600);
QVector<double> qv_zValues(600);
QVector<double> qv_phiValues(600);
QVector<double> qv_psiValues(600);
QVector<double> qv_dValues(600);
QList<QVector<double>> existingVectors;
QList<QVector<double>> existingVectors2;
double log_data1[7][60];
double log_data2[7][60];
#include <QThread>
int main(int argc, char *argv[])
{
// Creating a QApplication instance
QApplication a(argc, argv);
// Creating instances of main window, UDP, and logging thread
MainWindow main_screen;
udp UDP;
LoggingThread loggingThread;
// Connecting UDP packet receiver signal to main window's slot
QObject::connect(&(UDP.packet_recieve_handler), &UdpBridge::valueChanged, &main_screen, &MainWindow::receiverGuiSlot);
// Starting UDP and logging threads
UDP.start();
loggingThread.start();
// Displaying the main window
main_screen.show();
// Executing the application
return a.exec();
}