Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120761144
mainwindow.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 20:48
Size
802 B
Mime Type
text/x-c++
Expires
Tue, Jul 8, 20:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27199866
Attached To
R2671 HHRI-software
mainwindow.h
View Options
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSerialPort>
#include <QTimer>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void onReceivedData();
void zero();
void updateDisplay();
void clearDisplay();
protected:
void sendPacket(quint8 messageType, QByteArray dataBytes = QByteArray());
private:
Ui::MainWindow *ui;
QSerialPort serial;
QTimer updateTimer;
QByteArray rxBuffer;
int rxCurrentMessageType, rxBytesCount;
quint8 firstHalfByte;
quint8 rxDataBytesBuffer[1024];
int encoderVarIndex;
double lastEncoderValue; // [um].
double encoderOffset;
};
#endif // MAINWINDOW_H
Event Timeline
Log In to Comment