Fixed thread sync
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include <QObject>
|
||||
#include <QQueue>
|
||||
#include <QMutex>
|
||||
#include <atomic>
|
||||
|
||||
#include <bcvalue.h>
|
||||
#include <bcdrivertinycan.h>
|
||||
@@ -66,10 +65,11 @@ public slots:
|
||||
void onUpdateValue(BCValuePtrConst valuePtr );
|
||||
void onProcessValue();
|
||||
void onStartNativeDriver();
|
||||
void onEndOfTransmission();
|
||||
|
||||
signals:
|
||||
|
||||
void valueQueueEmpty();
|
||||
void endOfProcessing();
|
||||
void valueUpdated(BCDevice::ID deviceID, int index, BCValue::Flag state, uint32_t rawValue );
|
||||
void driverStateChanged( BCDriver::DriverState state, const QString& message="" );
|
||||
|
||||
@@ -81,8 +81,8 @@ private:
|
||||
TransmitResult readByteValue( uint32_t deviceID, uint8_t registerID );
|
||||
TransmitResult readWordValue( uint32_t deviceID, uint8_t registerID );
|
||||
|
||||
using BCDataQueue = QQueue<BCValuePtrConst>;
|
||||
BCDataQueue _valueQueue;
|
||||
//using BCDataQueue = QQueue<BCValuePtrConst>;
|
||||
//BCDataQueue _valueQueue;
|
||||
//QMutex _mutex;
|
||||
//std::atomic<bool> _isBusy{ false };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user