diff --git a/examples/cl-repl/app.pro b/examples/cl-repl/app.pro index 8f9a541..24e36d1 100644 --- a/examples/cl-repl/app.pro +++ b/examples/cl-repl/app.pro @@ -55,7 +55,7 @@ win32 { android { QT += androidextras - DEFINES += NO_TEXT_HANDLES + DEFINES += NO_TEXT_HANDLES NO_USB DEFINES -= DESKTOP_APP INCLUDEPATH = $$ECL/include ECL_VERSION = $$lower($$system($$ECL/../ecl-android-host/bin/ecl -v)) @@ -87,7 +87,7 @@ android { } ios { - DEFINES += NO_TEXT_HANDLES DISABLE_SMART_QUOTES + DEFINES += NO_TEXT_HANDLES DISABLE_SMART_QUOTES NO_USB DEFINES -= DESKTOP_APP INCLUDEPATH = $$(ECL_IOS)/include ECL_VERSION = $$lower($$system($ECL_IOS/../ecl-ios-host/bin/ecl -v)) diff --git a/examples/cl-repl/cpp/qt.cpp b/examples/cl-repl/cpp/qt.cpp index 66ac243..0619660 100644 --- a/examples/cl-repl/cpp/qt.cpp +++ b/examples/cl-repl/cpp/qt.cpp @@ -6,7 +6,7 @@ #include #include -#ifdef Q_OS_UNIX +#if (defined Q_OS_UNIX) && !(defined NO_USB) #include "usb/usb.h" #endif @@ -341,7 +341,7 @@ QVariant QT::localIp() { // USB -#ifdef Q_OS_UNIX +#if (defined Q_OS_UNIX) && !(defined NO_USB) QVariant QT::connectUsb() { if (usb == nullptr) { usb = new USB(); diff --git a/examples/cl-repl/cpp/qt.h b/examples/cl-repl/cpp/qt.h index 8c80d4a..8598d1a 100644 --- a/examples/cl-repl/cpp/qt.h +++ b/examples/cl-repl/cpp/qt.h @@ -28,7 +28,7 @@ QT_BEGIN_NAMESPACE extern "C" { LIB_EXPORT QObject* ini(); } -#ifdef Q_OS_UNIX +#if (defined Q_OS_UNIX) && !(defined NO_USB) class USB; #endif @@ -111,7 +111,7 @@ public: Q_INVOKABLE QVariant localIp(); // USB -#ifdef Q_OS_UNIX +#if (defined Q_OS_UNIX) && !(defined NO_USB) Q_INVOKABLE QVariant connectUsb (); Q_INVOKABLE QVariant sendToUlisp (const QVariant&); diff --git a/examples/meshtastic/cpp/connection/usb/usb_me.cpp b/examples/meshtastic/cpp/connection/usb/usb_me.cpp index 89f063c..19a6d11 100644 --- a/examples/meshtastic/cpp/connection/usb/usb_me.cpp +++ b/examples/meshtastic/cpp/connection/usb/usb_me.cpp @@ -28,7 +28,7 @@ void USB_ME::connectToRadio() { } const auto infos = QSerialPortInfo::availablePorts(); - // tested with HELTEC v3, LILYGO T-Beam, RAK 4631 + // tested with Heltec v3, LILYGO T-Beam, RAK 4631 const QStringList supported = { "RAK", "UART", "USB" }; for (auto info : infos) { QString name(info.manufacturer() + " | " + info.description()); @@ -54,9 +54,7 @@ void USB_ME::connectToRadio() { } done: - if (!open(QIODevice::ReadWrite)) { - qDebug() << "USB: unable to open port" << portName(); - } else { + if (open(QIODevice::ReadWrite)) { ready = true; setDataTerminalReady(true); setRequestToSend(true); @@ -64,6 +62,8 @@ done: con->setReady(QVariant(QVariantList() << true)); } qDebug() << "USB open"; + } else { + qDebug() << "USB: unable to open port" << portName(); } } diff --git a/examples/meshtastic/platforms/windows/setup.nsi b/examples/meshtastic/platforms/windows/setup.nsi index 451b1b7..1c8e9fd 100644 --- a/examples/meshtastic/platforms/windows/setup.nsi +++ b/examples/meshtastic/platforms/windows/setup.nsi @@ -1,7 +1,7 @@ Unicode True !include "MUI2.nsh" Name "Mesh SMS" - OutFile "out\Setup-Mesh-SMS-0.9.0.exe" + OutFile "out\Setup-Mesh-SMS-0.9.1.exe" InstallDir "$PROGRAMFILES\Mesh SMS" Var STARTMENU_FOLDER !define MUI_ABORTWARNING