Disable device's readiness before closing

This commit is contained in:
LordGrey 2024-05-27 19:51:01 +02:00
parent fb574b812f
commit bd08cabe80

View File

@ -94,6 +94,7 @@ int ProviderFtdi::open()
int ProviderFtdi::close() int ProviderFtdi::close()
{ {
LedDevice::close();
if (_ftdic != nullptr) { if (_ftdic != nullptr) {
Debug(_log, "Closing FTDI device"); Debug(_log, "Closing FTDI device");
// Delay to give time to push color black from writeBlack() into the led, // Delay to give time to push color black from writeBlack() into the led,
@ -104,7 +105,7 @@ int ProviderFtdi::close()
ftdi_free(_ftdic); ftdi_free(_ftdic);
_ftdic = nullptr; _ftdic = nullptr;
} }
return LedDevice::close(); return 0;
} }
void ProviderFtdi::setInError(const QString &errorMsg, bool isRecoverable) void ProviderFtdi::setInError(const QString &errorMsg, bool isRecoverable)