13std::atomic<bool> s_usePosixSerial{
false};
18 s_usePosixSerial.store(use);
19 qCDebug(AndroidSerialPortInfoLog) <<
"Serial ports:" << (use ?
"USB and POSIX" :
"USB");
24 return s_usePosixSerial.load();
#define QGC_LOGGING_CATEGORY(name, categoryStr)
static bool isUsbLocation(const QString &systemLocation)
static QList< QSerialPortInfo > posixPorts(const QString &devDir, const QString &sysTtyDir, const QList< QSerialPortInfo > &usbPorts={})
static QString portNameToSystemLocation(const QString &portName)
bool isUsbPermissionDenied(const QString &portName)
Whether the port is a USB one whose device the user has denied QGC, and has not been asked for again ...
bool hasPosixSerialPorts()
Whether the device has a serial port node that QGC may read and write.
void setUsePosixSerial(bool use)
bool requestUsbPermission(const QString &portName)
bool hasUsbPermission(const QString &portName)
Whether the port is a USB one whose device QGC may open.
bool hasPermission(const QString &portName)
Whether QGC may open the device of this port.
bool isPermissionDenied(const QString &portName)
bool requestPermission(const QString &portName)