From 04a478a5ad596831b2727b4923c185e1205e39d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 3 Nov 2022 22:50:54 +0100 Subject: [PATCH 1/3] Maybe fix crash of this board. --- variants/tlora_v2/variant.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/variants/tlora_v2/variant.h b/variants/tlora_v2/variant.h index 1bff09fb0..af91e0eea 100644 --- a/variants/tlora_v2/variant.h +++ b/variants/tlora_v2/variant.h @@ -1,7 +1,5 @@ #undef GPS_RX_PIN #undef GPS_TX_PIN -#define GPS_RX_PIN 36 -#define GPS_TX_PIN 13 // per @eugene #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage From 4ccb4393c56f7eea1ee5fee48e0ff4a687e62922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 4 Nov 2022 19:44:45 +0100 Subject: [PATCH 2/3] Fix MQTT on ETH --- src/main.cpp | 2 +- src/mesh/Router.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d7abdb2a9..e0f0783d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,7 @@ #include "nimble/NimbleBluetooth.h" #endif -#if HAS_WIFI || defined(ARCH_PORTDUINO) +#if HAS_WIFI #include "mesh/wifi/WiFiServerAPI.h" #include "mqtt/MQTT.h" #endif diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index 815571b9b..e0746bdd9 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -11,7 +11,7 @@ extern "C" { #include "mesh/compression/unishox2.h" } -#if HAS_WIFI +#if HAS_WIFI || HAS_ETHERNET #include "mqtt/MQTT.h" #endif @@ -209,7 +209,7 @@ ErrorCode Router::send(MeshPacket *p) if (p->which_payload_variant == MeshPacket_decoded_tag) { ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it -#if HAS_WIFI +#if HAS_WIFI || HAS_ETHERNET // check if we should send decrypted packets to mqtt // truth table: @@ -240,7 +240,7 @@ ErrorCode Router::send(MeshPacket *p) return encodeResult; // FIXME - this isn't a valid ErrorCode } -#if HAS_WIFI +#if HAS_WIFI || HAS_ETHERNET // the packet is now encrypted. // check if we should send encrypted packets to mqtt if (mqtt && shouldActuallyEncrypt) From 7c692444e5107ff17e7e8a8b9f43ccf8b27b7ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 4 Nov 2022 19:48:28 +0100 Subject: [PATCH 3/3] revert the tryfix --- variants/tlora_v2/variant.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/variants/tlora_v2/variant.h b/variants/tlora_v2/variant.h index 6a09839d6..0c854e37a 100644 --- a/variants/tlora_v2/variant.h +++ b/variants/tlora_v2/variant.h @@ -1,5 +1,7 @@ #undef GPS_RX_PIN #undef GPS_TX_PIN +#define GPS_RX_PIN 36 +#define GPS_TX_PIN 13 // per @eugene #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage