Reworked driver code, part II
This commit is contained in:
10
bcdriver.cpp
10
bcdriver.cpp
@@ -100,20 +100,14 @@ BCDriverDummy::BCDriverDummy( QObject* parent )
|
||||
{
|
||||
}
|
||||
|
||||
BCDriver::DriverState BCDriverDummy::loadAndInitDriver()
|
||||
{
|
||||
return BCDriver::DriverState::Ready;
|
||||
}
|
||||
|
||||
|
||||
uint32_t BCDriverDummy::readRawByte( uint32_t deviceID, uint8_t registerID ) const
|
||||
{
|
||||
//if( getState() != DriverState::Ready)
|
||||
// throw BCException( "readRawValue error: driver not loaded." );
|
||||
if( getState() != DriverState::Ready)
|
||||
throw BCException( "readRawValue error: driver not loaded." );
|
||||
|
||||
uint32_t myRandomByte = static_cast<uint32_t>(QRandomGenerator::global()->bounded(256));
|
||||
return myRandomByte;
|
||||
|
||||
}
|
||||
|
||||
void BCDriverDummy::writeRawByte( uint32_t deviceID, uint8_t registerID, uint8_t value ) const
|
||||
|
||||
Reference in New Issue
Block a user