-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElf.h
143 lines (96 loc) · 3.05 KB
/
Elf.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
140
141
142
143
#ifndef ELF_H
#define ELF_H
#include <QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QDebug>
#include <QDateTime>
#include <QTime>
#include <QTimer>
#include <QDir>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include "qcustomplot.h"
#include "../ANGEL/Angel.h"
namespace Ui {
class Elf;
}
class Elf : public QMainWindow
{
Q_OBJECT
private:
LockInAmplifier *lockInAmplifier;
Generator *generator;
QStringList xAxis;
QStringList yAxis;
QDir currentFolder;
bool constructor = false;
bool pause = false;
bool stop = false;
bool continuous = false;
bool generatorActive = false;
QTimer run;
QTime allTime;
double startTime;
const int waitBefore = 100;
const int updateTime = 100;
const int invalidPoints = 3;
const double check = false;
const int generator_send = 3;
int points = 0;
int wait = 0;
double from = 0;
double to = 0;
double step = 0;
QString reserveFileNameHeader = "Experiment_Reserve_File";
QString userFileNameHeader = "";
const double addUp = 0.0001;
const double subDown = 0.0001;
SimpleExperimentData experimentData;
public:
explicit Elf(QWidget *parent = 0);
~Elf();
void stopAll();
private slots:
bool inRange(const double &min, const double &max, const double &value);
// Hiding and showing
void showAll();
void hideAll();
// GraphPlotting
void on_graph_Clicked(QMouseEvent *event);
void on_comboBoxRange_currentTextChanged(const QString &arg1);
void on_pushButtonRangeManualreplot_clicked();
void updateGraph();
void replotGraph();
void pushGraph(const SimpleExperimentPoint &point);
void on_comboBoxXAxisValue_currentTextChanged(const QString &arg1);
void on_comboBoxYAxisValue_currentTextChanged(const QString &arg1);
// Lock-in Amplifier
void on_comboBoxSerialPortLockInAmplifier_currentTextChanged(const QString &arg1);
void on_checkBoxAutosettingsLockInAmplifier_stateChanged(int arg1);
void on_comboBoxTimeConstantLockInAmplifier_currentTextChanged(const QString &arg1);
void on_comboBoxInputVoltageRangeLockInAmplifier_currentTextChanged(const QString &arg1);
void on_comboBoxSensivityLockInAmplifier_currentTextChanged(const QString &arg1);
// Generator
void on_comboBoxSerialPortGenerator_currentTextChanged(const QString &arg1);
// Experiment
void on_comboBoxMode_currentTextChanged(const QString &arg1);
void changeConstants();
void on_spinBoxAverageOfPoints_valueChanged(int arg1);
void on_spinBoxWait_valueChanged(int arg1);
void timerStart(const int &ms = 0);
void timerPause();
void timerStop();
void experimentInit();
QString getFileName(const QString& header = "");
void on_pushButtonExport_clicked();
void on_pushButtonStart_clicked();
void on_pushButtonPause_clicked();
void on_pushButtonStop_clicked();
void experiment_StartingPoint();
void experiment_Run();
private:
Ui::Elf *ui;
};
#endif // ELF_H