Move value flags to bcvalue class definition.
This commit is contained in:
@@ -84,7 +84,7 @@ void BCTransmitter::onToggleConnectionState( bool connect )
|
||||
}
|
||||
|
||||
|
||||
void BCTransmitter::enqueueValueOp(BC::OpID opID, const BCValue* value)
|
||||
void BCTransmitter::enqueueValueOp(BCValue::OpID opID, const BCValue* value)
|
||||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
_valueQueue.enqueue( value );
|
||||
@@ -100,11 +100,11 @@ void BCTransmitter::enqueueValueOp(BC::OpID opID, const BCValue* value)
|
||||
//QMetaObject::invokeMethod(this, "processValueOp", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(this, [this, opID]()
|
||||
{
|
||||
this->processValueOp(opID);
|
||||
processValueOp(opID);
|
||||
}, Qt::QueuedConnection );
|
||||
}
|
||||
|
||||
void BCTransmitter::processValueOp( BC::OpID opID )
|
||||
void BCTransmitter::processValueOp( BCValue::OpID opID )
|
||||
{
|
||||
|
||||
if (_isBusy)
|
||||
@@ -131,14 +131,14 @@ void BCTransmitter::processValueOp( BC::OpID opID )
|
||||
// Abkürzung
|
||||
const BCValue& val = *currentValue;
|
||||
// Value ist 'under construction'
|
||||
//emit valueUpdated( val.deviceID, val.indexRow, BC::State::Locked );
|
||||
if( opID == BC::OpID::ReadValue )
|
||||
//emit valueUpdated( val.deviceID, val.indexRow, BCValue::State::Locked );
|
||||
if( opID == BCValue::OpID::ReadValue )
|
||||
{
|
||||
QString result = currentValue->readRawValueX( *this );
|
||||
emit valueUpdated( val.deviceID, val.indexRow, BC::State::InSync, result );
|
||||
emit valueUpdated( val.deviceID, val.indexRow, BCValue::State::InSync, result );
|
||||
}
|
||||
|
||||
else if( opID == BC::OpID::WriteValue )
|
||||
else if( opID == BCValue::OpID::WriteValue )
|
||||
{
|
||||
currentValue->writeRawValueX( *this );
|
||||
}
|
||||
@@ -149,6 +149,9 @@ void BCTransmitter::processValueOp( BC::OpID opID )
|
||||
qDebug() << " --- OUCH!";
|
||||
}
|
||||
|
||||
// __fix
|
||||
bc::processEventsFor(50);
|
||||
|
||||
//emit valueStateChanged(cmd.id, true);
|
||||
//emit valueStateChanged(0, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user