From 5dfe7b3c716a23d56c454738aa4287ad143757c1 Mon Sep 17 00:00:00 2001 From: Holden Date: Tue, 29 Mar 2022 02:35:16 -0400 Subject: [PATCH] fix seriallink error signal connection --- src/comm/SerialLink.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/comm/SerialLink.cc b/src/comm/SerialLink.cc index ca523ef..8527212 100644 --- a/src/comm/SerialLink.cc +++ b/src/comm/SerialLink.cc @@ -177,7 +177,11 @@ bool SerialLink::_hardwareConnect(QSerialPort::SerialPortError& error, QString& _port = new QSerialPort(_serialConfig->portName(), this); - QObject::connect(_port, static_cast(&QSerialPort::error), this, &SerialLink::linkError); +#ifdef Q_OS_ANDROID + QObject::connect(_port, SIGNAL(&QSerialPort::error), this, SLOT(&SerialLink::linkError)); +#else + QObject::connect(_port, &QSerialPort::errorOccurred, this, &SerialLink::linkError); +#endif QObject::connect(_port, &QIODevice::readyRead, this, &SerialLink::_readBytes); // After the bootloader times out, it still can take a second or so for the Pixhawk USB driver to come up and make