Compiles again.
This commit is contained in:
@@ -256,7 +256,7 @@ void BCMainWindow::onSyncFromDevice()
|
||||
// wir setze
|
||||
// statt '_transmitter.enqueueValueCommand( value )' entkoppeln
|
||||
// wir das eleganter über emit requestValueUpdate()
|
||||
//emit requestValueUpdate( value);
|
||||
emit requestValueUpdate( value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public slots:
|
||||
signals:
|
||||
|
||||
// Internes Signal, um Daten an den Worker Thread zu senden
|
||||
void requestValueUpdate( const BCValue& value);
|
||||
void requestValueUpdate( const BCValuePtr value);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ void BCTransmitter::onToggleConnectionState( bool connect )
|
||||
}
|
||||
|
||||
|
||||
void BCTransmitter::enqueueValueOp( const BCValue& value)
|
||||
void BCTransmitter::enqueueValueOp( const BCValuePtr value)
|
||||
{
|
||||
// Hier sind wir noch in GUI Thread
|
||||
QMutexLocker locker(&_mutex);
|
||||
@@ -98,7 +98,7 @@ void BCTransmitter::processValueOp()
|
||||
|
||||
while (true)
|
||||
{
|
||||
BCValue* currentValue{};
|
||||
BCValuePtr value{};
|
||||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
if (_valueQueue.isEmpty())
|
||||
@@ -106,15 +106,16 @@ void BCTransmitter::processValueOp()
|
||||
_isBusy = false;
|
||||
break; // Schleife verlassen, warten auf neue Events
|
||||
}
|
||||
//currentValue =_valueQueue.dequeue();
|
||||
value =_valueQueue.dequeue();
|
||||
} // Mutex wird hier freigegeben! WICHTIG: Execute ohne Lock!
|
||||
|
||||
/*
|
||||
|
||||
// Abkürzung
|
||||
const BCValue& value = *currentValue;
|
||||
//const BCValue& value = *currentValue;
|
||||
// Value ist 'under construction'
|
||||
//emit valueUpdated( val.deviceID, val.indexRow, BCValue::State::Locked );
|
||||
|
||||
/*
|
||||
if( opID == BCValue::OpID::ReadValue )
|
||||
{
|
||||
QString result = currentValue->readRawValueX( *this );
|
||||
@@ -125,6 +126,7 @@ void BCTransmitter::processValueOp()
|
||||
currentValue->writeRawValueX( *this );
|
||||
}
|
||||
*/
|
||||
emit valueUpdated( value->deviceID, value->indexRow, BCValue::State::InSync, "fitze!");
|
||||
|
||||
// __fix
|
||||
bc::processEventsFor(50);
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
public slots:
|
||||
|
||||
void onToggleConnectionState( bool connect );
|
||||
void enqueueValueOp(const BCValue& value );
|
||||
void enqueueValueOp(const BCValuePtr value );
|
||||
void processValueOp();
|
||||
|
||||
signals:
|
||||
@@ -74,7 +74,7 @@ signals:
|
||||
|
||||
private:
|
||||
|
||||
using BCDataQueue = QQueue<BCValue>;
|
||||
using BCDataQueue = QQueue<BCValuePtr>;
|
||||
|
||||
BCDataQueue _valueQueue;
|
||||
QMutex _mutex;
|
||||
|
||||
@@ -109,13 +109,14 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(BCValue::States)
|
||||
|
||||
|
||||
|
||||
Q_DECLARE_METATYPE(const BCValue&)
|
||||
//Q_DECLARE_METATYPE(const BCValue&)
|
||||
|
||||
using BCValuePtr = std::shared_ptr<BCValue>;
|
||||
//using BCValueList = QList<BCValue>;
|
||||
using BCValueList = QList<BCValuePtr>;
|
||||
|
||||
Q_DECLARE_METATYPE(const BCValuePtr)
|
||||
|
||||
/*
|
||||
class BCValueList : public QList<BCValue>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user