-
Notifications
You must be signed in to change notification settings - Fork 0
/
win_main.h
executable file
·58 lines (49 loc) · 1.09 KB
/
win_main.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
#ifndef WIN_MAIN_H
#define WIN_MAIN_H
#include <QWidget>
#include <QSerialPort>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QString>
#include <QList>
#include <QTime>
#include <QDateTime>
#include <QCursor>
#include <QDebug>
#include <windows.h>
#define ALPHA 0.8
#define CALIBRE_COUNTER 100
#define SENSIVITY 50
namespace Ui {
class win_main;
}
class win_main : public QWidget
{
Q_OBJECT
public:
explicit win_main(QWidget *parent = 0);
~win_main();
private:
Ui::win_main *ui;
QSerialPort* sPort;
QString inputData;
QString currentPort;
bool isConnected;
bool calibrePhase;
int calibreCounter;
int LUx;
int LUy;
float gx_bias;
float gy_bias;
float gz_bias;
void detectDevice();
void handleData();
void updateData(int index, float x);
void calibre(int index, float x);
void moveMouseX(int vx);
void moveMouseY(int vy);
void mouseLeftClick(bool clicked);
private slots:
void receiveData();
};
#endif // WIN_MAIN_H