LED not working, maybe due to data size?

failbranch
Phil Taylor 2023-02-02 15:47:59 +00:00
rodzic 6c44ea9e0d
commit 193e07284e
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -479,10 +479,10 @@ void usbController::ledControl(bool on, unsigned char num)
void usbController::getVersion()
{
QByteArray data(9, 0x0);
data[0] = 8;
QByteArray data(64, 0x0);
data[0] = 63;
data[1] = 0x02;
int res = hid_write(handle, (const unsigned char*)data.constData(), 8);
int res = hid_write(handle, (const unsigned char*)data.constData(), data.size());
if (res < 0) {
qDebug(logUsbControl()) << "Unable to write(), Error:" << hid_error(handle);