From c33569f833c6947ea809023342b4a72369a72b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 12 Jan 2023 19:08:41 +0100 Subject: [PATCH 1/4] re-merge fixes by @lesykm --- src/modules/SerialModule.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index 5d02e3ba8..e4ec57a4b 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -61,7 +61,8 @@ SerialModuleRadio *serialModuleRadio; SerialModule::SerialModule() : StreamAPI(&Serial2), concurrency::OSThread("SerialModule") {} -char serialStringChar[Constants_DATA_PAYLOAD_LEN]; +char serialBytes[Constants_DATA_PAYLOAD_LEN]; +size_t serialPayloadSize; SerialModuleRadio::SerialModuleRadio() : MeshModule("SerialModuleRadio") { @@ -203,15 +204,9 @@ int32_t SerialModule::runOnce() Serial2.printf("%s", outbuf); } } else { - String serialString; - while (Serial2.available()) { - serialString = Serial2.readString(); - serialString.toCharArray(serialStringChar, Constants_DATA_PAYLOAD_LEN); - + serialPayloadSize = Serial2.readBytes(serialBytes, Constants_DATA_PAYLOAD_LEN); serialModuleRadio->sendPayload(); - - LOG_INFO("Received: %s\n", serialStringChar); } } } @@ -231,14 +226,18 @@ MeshPacket *SerialModuleRadio::allocReply() void SerialModuleRadio::sendPayload(NodeNum dest, bool wantReplies) { + Channel *ch = (boundChannel != NULL) ? &channels.getByName(boundChannel) : NULL; MeshPacket *p = allocReply(); p->to = dest; + if (ch != NULL) { + p->channel = ch->index; + } p->decoded.want_response = wantReplies; p->want_ack = ACK; - p->decoded.payload.size = strlen(serialStringChar); // You must specify how many bytes are in the reply - memcpy(p->decoded.payload.bytes, serialStringChar, p->decoded.payload.size); + p->decoded.payload.size = serialPayloadSize; // You must specify how many bytes are in the reply + memcpy(p->decoded.payload.bytes, serialBytes, p->decoded.payload.size); service.sendToMesh(p); } From 7e27729daed7887e8bb3547e998ed33cae1cbe0f Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 15 Jan 2023 08:24:20 -0600 Subject: [PATCH 2/4] Remove HAS_GPS for WSLv3 --- variants/heltec_wsl_v3/variant.h | 1 - 1 file changed, 1 deletion(-) diff --git a/variants/heltec_wsl_v3/variant.h b/variants/heltec_wsl_v3/variant.h index 60f611248..b8f911066 100644 --- a/variants/heltec_wsl_v3/variant.h +++ b/variants/heltec_wsl_v3/variant.h @@ -1,7 +1,6 @@ #define LED_PIN LED #define HAS_SCREEN 0 -#define HAS_GPS 0 #define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost #define BUTTON_PIN 0 From 85dd606423c17d858d0f2bdc002a008491b54f30 Mon Sep 17 00:00:00 2001 From: garthvh Date: Sun, 15 Jan 2023 16:52:29 +0000 Subject: [PATCH 3/4] [create-pull-request] automated change --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 40e7926a9..7cf773466 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 0 -build = 13 +build = 14 From 34b2d51113ff7ecfb73171f74ddece6ac84d2ff4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 16 Jan 2023 11:05:36 -0600 Subject: [PATCH 4/4] Patch locked_to --- src/mqtt/MQTT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index cc091bcff..448b5c497 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -478,7 +478,7 @@ std::string MQTT::downstreamPacketToJson(MeshPacket *mp) msgPayload["name"] = new JSONValue(decoded->name); msgPayload["description"] = new JSONValue(decoded->description); msgPayload["expire"] = new JSONValue((int)decoded->expire); - msgPayload["locked"] = new JSONValue(decoded->locked); + msgPayload["locked_to"] = new JSONValue(decoded->locked_to); msgPayload["latitude_i"] = new JSONValue((int)decoded->latitude_i); msgPayload["longitude_i"] = new JSONValue((int)decoded->longitude_i); jsonObj["payload"] = new JSONValue(msgPayload);