forked from JackStocker/GigaPi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
139 lines (94 loc) · 2.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
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
131
132
133
134
135
136
137
138
139
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTimer>
#include "settings.h"
#include "adjustments.h"
#include "progress.h"
#include "editbox.h"
struct GigaPi_Row
{
double V_Angle ;
double V_Overlap ;
double B_NumPics ;
double B_Angle ;
double H_Angle ;
double H_Overlap ;
int L_NumPics ;
};
static enum MOTOR { HORIZONTAL = 0, VERTICAL = 1 } motor ;
static enum GIGAPI_STATES { TAKE_PICTURE, FOCUS, SHUTTER, WRITE_TO_CARD, STEP_RIGHT, STEP_DOWN, RESET_TO_LEFT, TAKE_UP_SLACK, RESET_TO_TOP, FINISH } GigaPi_State ;
struct Motor
{
int id ;
int worm_wheel_teeth ;
bool isHorizontal ;
double min_full_step ;
int steps_per_rev ;
} ;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_Pb_Go_clicked();
void on_Pb_Settings_clicked();
void OnTick() ;
void OnGigaPiTimerTick() ;
void on_Pb_Down_pressed();
void on_Pb_Right_pressed();
void on_Pb_Left_pressed();
void on_Pb_Up_pressed();
void ButtonReleased() ;
void on_Pb_Close_clicked() ;
void on_Pb_Shutdown_clicked() ;
void on_Pb_Adjustments_clicked();
void on_Pb_Rotate_clicked();
private:
Ui::MainWindow *ui;
int steps_to_go ;
//int motor ;
EditBox *Eb_HAngle ;
EditBox *Eb_VAngle ;
void setup() ;
void stepMotor( Motor motor, bool reverse ) ;
void Rotate( Motor motor, double degrees, bool reverse ) ;
Settings *settings ;
Adjustments *adjustments ;
QTimer *spin_timer ;
QTimer *GigaPi_Timer ;
Progress *progress ;
int horizontal_steps_to_go ;
int vertical_steps_to_go ;
int current_row ;
Motor Horizontal ;
Motor Vertical ;
Motor current_motor ;
void ShowDialog( QDialog & ) ;
int delay_int ;
bool reverse ;
int H_Viewing_Angle ;
int V_Viewing_Angle ;
int H_Pic_Overlap ;
int V_Pic_Overlap ;
int Actual_V_Angle ;
double Sensor_Height ;
double Sensor_Width ;
int Focal_Length ;
double H_FOV ;
double V_FOV ;
double H_ROT ;
double V_ROT ;
double H_Min_Step ;
double V_Min_Step ;
double H_ROT_arr ;
double V_ROT_arr ;
double H_Angle_Moved ;
QList< GigaPi_Row > GigaPi_Row_List ;
};
#endif // MAINWINDOW_H