-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
130 lines (81 loc) · 2.5 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "settingsdialog.h"
#include "motor.h"
#include <QtCore>
#include <QtGui>
#include <QtWidgets>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
bool WireSerialOpen;
bool RotationSerialOpen;
public slots:
//wires
void openSerialPort_wire();
void closeSerialPort_wire();
void readData_wire();
void handleError_wire(QSerialPort::SerialPortError error);
void GetPositions_wire();
//rotation
void openSerialPort_rotation();
void closeSerialPort_rotation();
void readData_rotation();
void handleError_rotation(QSerialPort::SerialPortError error);
//common
private slots:
//wires
void on_actionComms_wire_Settings_triggered();
//rotation
//common
void on_actionConnect_to_motors_triggered();
void on_action_Exit_triggered();
void on_lower_speed_spin_valueChanged(int arg1);
void on_lower_enable_toggled(bool checked);
void on_upper_enable_toggled(bool checked);
void on_lower_pos_spin_valueChanged(int arg1);
void on_upper_diameter_spin_valueChanged(double arg1);
//void on_lower_enable_clicked(bool checked);
//void on_lower_enable_clicked();
void on_Lower_Pos_Zero_clicked();
void on_EMERGENCY_STOP_clicked();
void on_upper_speed_spin_editingFinished();
void on_RUN_clicked();
void on_lower_diameter_spin_valueChanged(double arg1);
void on_jog_speed_spin_valueChanged(double arg1);
void on_jog_speed_save_clicked();
void on_jog_speed_restore_clicked();
void on_actionRotation_Comms_Settings_triggered();
void on_actionConnect_to_Rotation_Stage_triggered();
void on_Rotation_speed_spin_valueChanged(int arg1);
void on_Rotation_pos_spin_valueChanged(int arg1);
void on_pushButton_clicked(bool checked);
void on_actionComms_Settings_triggered();
void on_Rotation_pos_spin_editingFinished();
private:
Ui::MainWindow *ui;
QSerialPort *serial_wire, *serial_rotation;
SettingsDialog *settings_wire, *settings_rotation;
Motor upper;
Motor lower;
Motor rotation;
QLabel *serialstatus_wire;
QLabel *serialstatus_rotation;
QLabel *motor1status;
QLabel *motor2status;
QLabel *rotationstatus;
QTimer *timer;
bool E_STOPPED;
double saved_speed;
double saved_pos;
int lp;
int up;
};
#endif // MAINWINDOW_H