-
Notifications
You must be signed in to change notification settings - Fork 46
/
tab_veltest.h
69 lines (51 loc) · 1.09 KB
/
tab_veltest.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
#include <QWidget>
#include <fstream>
#include <stdint.h>
#include <QList>
#include <QTime>
#include <QVector>
class MyThread;
class QwtPlotCurve;
class QwtPlot;
class QStatusBar;
class QCheckBox;
class QTreeWidget;
class QTreeWidgetItem;
class QTabWidget;
class QPushButton;
class QLineEdit;
class QLabel;
#include "mainwindow.h"
const char AxisChars[]={'X','Y','Z','E'};
struct TestCase
{
uint8_t axis;
float v,a,xyjerk,zjerk;
};
class TabVeltest : public QWidget
{
Q_OBJECT
public:
TabVeltest(MainWindow* _mw,QWidget *parent);
void calculatePeriodicity();
void starttest(uint8_t axis);
bool testSetting(uint8_t axis, float v, float a, float xyjerk, float zjerk);
void startTestCase(TestCase &tc);
QwtPlotCurve *curveGood,*curveFail ;
QwtPlot *plot;
QLineEdit *vmax[4],*vmin[4],*vsteps;
QLineEdit *amax[4],*asteps;
QPushButton *doTest[3];
QVector<double> sucess_x,sucess_y;
QVector<double> fail_x,fail_y;
MainWindow *mw;
QList<TestCase> bufferedCases;
public slots:
void testX();
void testY();
void testZ();
void checkDone();
signals:
private:
bool testing;
};