-
Notifications
You must be signed in to change notification settings - Fork 1
/
mainwindow.h
77 lines (59 loc) · 1.38 KB
/
mainwindow.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "cubie.h"
#include "connectdialog.h"
#include "keysdialog.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_action_connect_triggered();
void update();
void on_throttleSlider_valueChanged(int value);
void on_action_keys_triggered();
void on_P_SpinBox_valueChanged(const QString &arg1);
void on_I_SpinBox_valueChanged(const QString &arg1);
void on_D_SpinBox_valueChanged(const QString &arg1);
public slots:
void connectionEstablished();
void packetSent();
void feedbackConnectionEstablished();
void feedbackUpdate();
void graphUpdate();
private:
Ui::MainWindow *ui;
bool keyState[4];
bool throttleUpKeyState;
bool throttleDownKeyState;
bool yawLeftKeyState;
bool yawRightKeyState;
Cubie *cubie;
int sendedPackets;
bool connected;
connectDialog cDialog;
keysDialog kDialog;
QVector<double> x, pitchData, rollData, yawData;
//Функции
void keyPressEvent(QKeyEvent*);
void keyReleaseEvent(QKeyEvent*);
void throttle_up();
void throttle_down();
void yaw_left();
void yaw_right();
void yaw_center();
void roll_left();
void roll_right();
void roll_center();
void pitch_up();
void pitch_down();
void pitch_center();
void graphInit();
};
#endif // MAINWINDOW_H