1 #ifndef STRAINCALIBGUI_H
2 #define STRAINCALIBGUI_H
5 #include <QSignalMapper>
11 #include <QFutureWatcher>
17 #include <yarp/os/Network.h>
18 #include <yarp/os/Os.h>
19 #include <yarp/os/Time.h>
20 #include <yarp/os/PeriodicThread.h>
21 #include <yarp/dev/ControlBoardInterfaces.h>
22 #include <yarp/dev/PolyDriver.h>
23 #include <yarp/dev/CanBusInterface.h>
43 void turnOffButtons();
46 void terminate_section();
49 bool get(
const unsigned int number, vector<cDownloader::strain_value_t> &values,
bool debugprint =
true,
bool updateprogress =
true);
50 bool print(
const vector<cDownloader::strain_value_t> &values, FILE *fp, QList<float> = QList<float>());
52 void acquire_1000_samples();
54 bool acquire_samples(
int samples);
58 Ui::StrainCalibGui *ui;
59 QDoubleValidator validator;
60 QFutureWatcher<bool> watcher;
63 QSignalMapper signalMapper;
64 QList <QPushButton*> buttons;
65 QList <QLineEdit*> readValues;
66 QList <QLineEdit*> expValues;
67 QList <QLineEdit*> errValues;
79 volatile bool acquiringdata;
80 QMutex mutexacquisitionofdata;
82 void setAcquisitionOfDataActive(
const bool active);
83 bool isAcquisitionOfDataActive();
84 void lockdriver(
const bool on);
86 bool tick_acquisition(
int samples);
88 bool enabledebugprints;
89 volatile bool enableacquisitions;
91 void stopacquisitions(
bool forcestop =
true);
93 static void progressbar(
void *owner,
float percent);
95 volatile int progressvalue;
97 bool checkDirectory();
100 void onButtonClick(
bool b);
101 void onAcquireData(
bool b);
102 void onTimerTimeout();
103 void onFutureFinished();
104 void onFreeAcqMode(
bool);
StrainCalibGui(QString device, int bus, int pid, FirmwareUpdaterCore *core, QWidget *parent=0)