Reworked driver code, again.

This commit is contained in:
2026-01-03 20:10:30 +01:00
parent 68680db6b4
commit 3a132bb584
22 changed files with 228 additions and 184 deletions

View File

@@ -37,12 +37,6 @@
BCDriver::BCDriver(QObject* parent )
: QObject{ parent }
{
}
BCDriver::DriverState BCDriver::getDriverState() const
{
return _driverState;
@@ -59,47 +53,16 @@ BCDriver::DriverState BCDriver::getDriverState() const
* aber die Console noch nicht eingeschaltet war.
*/
void BCDriverDummy::onStartDriver()
BCDriver::DriverStateResult BCDriverDummy::loadAndStartDriver()
{
_driverState = DriverState::DeviceReady;
emit driverStateChanged( DriverState::DeviceReady, "Driver Ready." );
return _driverState;
}
// __Fix
/*
try
{
// erstmal die Dll Laden: State::sIdle -> State::sLoaded
if( _driverState == DriverState::NotPresent)
_driverState = loadAndInitDriver();
emit stateChanged( _driverState );
}
catch( std::exception& except )
{
//::CanDownDriver();
//::UnloadAndInitDriver();
emit statusHint( except.what() );
}
*/
/// -----------------------------------------------------------------------------------
/// -----------------------------------------------------------------------------------
/**
* @brief BCDriverDummy::BCDriverDummy
* @param parent
*/
BCDriverDummy::BCDriverDummy( QObject* parent )
: BCDriver(parent)
{
}
TransmitResult BCDriverDummy::readRawByte( uint32_t deviceID, uint8_t registerID ) const
{