mirror of
https://github.com/vale981/Taevitas
synced 2025-03-04 17:11:40 -05:00
A bit more refactoring.
This commit is contained in:
parent
7e07d7b954
commit
6aabd0f1a8
2 changed files with 9 additions and 6 deletions
|
@ -10,12 +10,13 @@ class ImageGrabber : public QThread {
|
|||
public:
|
||||
ImageGrabber( QObject * parent = 0 ) : QThread( parent ) {}
|
||||
void run() Q_DECL_OVERRIDE;
|
||||
|
||||
void setCamera( FlyCapture2::Camera * cam );
|
||||
|
||||
private:
|
||||
bool capture;
|
||||
FlyCapture2::Camera * cam;
|
||||
|
||||
FlyCapture2::Camera * cam;
|
||||
FlyCapture2::Image tmp;
|
||||
|
||||
signals:
|
||||
|
|
|
@ -9,13 +9,12 @@ class SerialCommunicator : public QObject {
|
|||
public:
|
||||
explicit SerialCommunicator( QObject * parent = 0 );
|
||||
~SerialCommunicator();
|
||||
const QList<QSerialPortInfo> &getPorts();
|
||||
|
||||
bool isConnected() const {
|
||||
return port.isOpen();
|
||||
}
|
||||
|
||||
signals:
|
||||
void dataRead( QByteArray data );
|
||||
const QList<QSerialPortInfo> &getPorts();
|
||||
|
||||
public slots:
|
||||
// returns False if the port is not open
|
||||
|
@ -43,12 +42,15 @@ class SerialCommunicator : public QObject {
|
|||
private:
|
||||
QSerialPort port;
|
||||
QList<QSerialPortInfo> ports;
|
||||
void write( QByteArray data );
|
||||
|
||||
int lastBuff;
|
||||
|
||||
void write( QByteArray data );
|
||||
|
||||
private slots:
|
||||
void handleRead();
|
||||
|
||||
signals:
|
||||
void dataRead( QByteArray data );
|
||||
};
|
||||
|
||||
bool SerialCommunicator::selectPort( const int index ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue