Changed copyright notice.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/***************************************************************************
|
||||
|
||||
BionxControl
|
||||
Copyright © 2025 christoph holzheuer
|
||||
© 2025 -2026 christoph holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
Using:
|
||||
@@ -57,11 +57,13 @@ void BCTransmitter::onToggleDriverConnection( bool connect )
|
||||
{
|
||||
qDebug() << " --- onToggleDriverConnection: " << connect;
|
||||
// FIX! Ende der current op abwarten!
|
||||
|
||||
// Hier sind wir noch in GUI Thread
|
||||
QMutexLocker locker(&_mutex);
|
||||
// weitere operation stoppen
|
||||
_isBusy = true;
|
||||
|
||||
connect ? connectCanDriver() : disconnectCanDriver();
|
||||
|
||||
_isBusy = false;
|
||||
}
|
||||
|
||||
void BCTransmitter::connectCanDriver()
|
||||
@@ -69,27 +71,42 @@ void BCTransmitter::connectCanDriver()
|
||||
// hier gehts nur um den echten Treiber
|
||||
|
||||
// Treiber laden und/oder starten:
|
||||
BCDriver::DriverStateResult result; //(defaults to 'NotPresent')
|
||||
if( _tinyCanDriver.getDriverState() != BCDriver::DriverState::DeviceReady )
|
||||
_tinyCanDriver.loadAndStartDriver();
|
||||
result = _tinyCanDriver.loadAndStartDriver();
|
||||
|
||||
QString message("FitzeFatze!");
|
||||
// hat geklappt
|
||||
if( _tinyCanDriver.getDriverState() == BCDriver::DriverState::DeviceReady )
|
||||
if( _tinyCanDriver.getDriverState() >= BCDriver::DriverState::Opened )
|
||||
{
|
||||
uint32_t console = static_cast<uint32_t>(BCDevice::ID::Console);
|
||||
uint8_t hwRev = static_cast<uint8_t> (BC::ID::Cons_Rev_Hw);
|
||||
|
||||
TransmitResult hwVersion = _tinyCanDriver.readRawByte( console, hwRev);
|
||||
if( hwVersion.has_value() )
|
||||
qDebug() << " ---- HAIL to the king!";
|
||||
{
|
||||
message = " ---- HAIL to the king!";
|
||||
qDebug() << message;
|
||||
// swap driver
|
||||
_canDriver = &_tinyCanDriver;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "Console not responding";
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
message = result.error();
|
||||
}
|
||||
emit driverStateChanged( _tinyCanDriver.getDriverState(), message );
|
||||
}
|
||||
|
||||
void BCTransmitter::disconnectCanDriver()
|
||||
{
|
||||
|
||||
_tinyCanDriver.resetDriver();
|
||||
_canDriver = &_dummyDriver;
|
||||
emit driverStateChanged( _tinyCanDriver.getDriverState(), "Disconnected" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user