From 4c97351187c80f38d680f2ef3fde18e427d29d50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:52:17 -0600 Subject: [PATCH 1/5] [create-pull-request] automated change (#5926) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/protobufs b/protobufs index fde27e4ef..7f13df0e5 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit fde27e4ef0fcee967063ba353422ed5f9a1c4790 +Subproject commit 7f13df0e5f7cbb07f0e6f3a57c0d86ad448738db diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 5cd23c8e3..3353a020f 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -223,6 +223,9 @@ typedef enum _meshtastic_HardwareModel { /* Mesh-Tab, esp32 based https://github.com/valzzu/Mesh-Tab */ meshtastic_HardwareModel_MESH_TAB = 86, + /* MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog + https://www.loraitalia.it */ + meshtastic_HardwareModel_MESHLINK = 87, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ From fd56995764c3ea003a989e85965e197617854e3c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2025 07:53:24 -0600 Subject: [PATCH 2/5] [create-pull-request] automated change (#5928) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- debian/changelog | 5 +++-- version.properties | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index a1a359cfb..1b371296b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ -meshtasticd (2.5.20.0) UNRELEASED; urgency=medium +meshtasticd (2.5.21.0) UNRELEASED; urgency=medium * Initial packaging * GitHub Actions Automatic version bump * GitHub Actions Automatic version bump + * GitHub Actions Automatic version bump - -- Austin Lane Wed, 15 Jan 2025 14:08:54 +0000 + -- Austin Lane Sat, 25 Jan 2025 01:39:16 +0000 diff --git a/version.properties b/version.properties index 4312ae59a..efc42428c 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 5 -build = 20 +build = 21 From a14346bc4f862f8f713e9d2e21704b14ae5c99b1 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Sat, 25 Jan 2025 16:24:24 +0100 Subject: [PATCH 3/5] Rate limit position replies to three minutes (#5932) --- src/modules/PositionModule.cpp | 20 ++++++++++++++++---- src/modules/PositionModule.h | 2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 6285d7aa5..95a47f0a1 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -160,7 +160,8 @@ bool PositionModule::hasGPS() #endif } -meshtastic_MeshPacket *PositionModule::allocReply() +// Allocate a packet with our position data if we have one +meshtastic_MeshPacket *PositionModule::allocPositionPacket() { if (precision == 0) { LOG_DEBUG("Skip location send because precision is set to 0!"); @@ -262,7 +263,8 @@ meshtastic_MeshPacket *PositionModule::allocReply() p.has_ground_speed = true; } - LOG_INFO("Position reply: time=%i lat=%i lon=%i", p.time, p.latitude_i, p.longitude_i); + LOG_INFO("Position packet: time=%i lat=%i lon=%i", p.time, p.latitude_i, p.longitude_i); + lastSentToMesh = millis(); // TAK Tracker devices should send their position in a TAK packet over the ATAK port if (config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) @@ -271,6 +273,16 @@ meshtastic_MeshPacket *PositionModule::allocReply() return allocDataProtobuf(p); } +meshtastic_MeshPacket *PositionModule::allocReply() +{ + if (lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 3 * 60 * 1000)) { + LOG_DEBUG("Skip Position reply since we sent it <3min ago"); + ignoreRequest = true; // Mark it as ignored for MeshModule + return nullptr; + } + return allocPositionPacket(); +} + meshtastic_MeshPacket *PositionModule::allocAtakPli() { LOG_INFO("Send TAK PLI packet"); @@ -333,9 +345,9 @@ void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t cha precision = 0; } - meshtastic_MeshPacket *p = allocReply(); + meshtastic_MeshPacket *p = allocPositionPacket(); if (p == nullptr) { - LOG_DEBUG("allocReply returned a nullptr"); + LOG_DEBUG("allocPositionPacket returned a nullptr"); return; } diff --git a/src/modules/PositionModule.h b/src/modules/PositionModule.h index 1e4aa5d29..dc732a3db 100644 --- a/src/modules/PositionModule.h +++ b/src/modules/PositionModule.h @@ -55,6 +55,7 @@ class PositionModule : public ProtobufModule, private concu virtual int32_t runOnce() override; private: + meshtastic_MeshPacket *allocPositionPacket(); struct SmartPosition getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition); meshtastic_MeshPacket *allocAtakPli(); void trySetRtc(meshtastic_Position p, bool isLocal, bool forceUpdate = false); @@ -62,6 +63,7 @@ class PositionModule : public ProtobufModule, private concu void sendLostAndFoundText(); bool hasQualityTimesource(); bool hasGPS(); + uint32_t lastSentToMesh = 0; // Last time we sent our position to the mesh const uint32_t minimumTimeThreshold = Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30); From 7649e70585ab1fa9a67924c7e5ab4a85b4bf702a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 25 Jan 2025 12:01:25 -0600 Subject: [PATCH 4/5] Revert "No focus on new messages if auto-carousel is off (#5881)" (#5936) This reverts commit 0f981153ebbad06675f04bd9b0dd6170c7f08352. --- src/graphics/Screen.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index b7253ca17..198dcc235 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -2662,13 +2662,14 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg) int Screen::handleTextMessage(const meshtastic_MeshPacket *packet) { - // If auto carousel is disabled -> return 0 and skip new messages handling - if (config.display.auto_screen_carousel_secs == 0) - return 0; - - // Handle focus change based on message type if (showingNormalScreen) { - setFrames(packet->from == 0 ? FOCUS_PRESERVE : FOCUS_TEXTMESSAGE); + // Outgoing message + if (packet->from == 0) + setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame) + + // Incoming message + else + setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message } return 0; @@ -2755,4 +2756,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg) } // namespace graphics #else graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {} -#endif // HAS_SCREEN \ No newline at end of file +#endif // HAS_SCREEN From 10d553087c4d8158b961a5b9ab8b6a1ff413ca38 Mon Sep 17 00:00:00 2001 From: Aleksey Vasilenko Date: Sun, 26 Jan 2025 10:54:26 +0200 Subject: [PATCH 5/5] Add missing build_unflags (#5941) Fixes 'undefined reference to app_main' build error for my_esp32s3_diy_eink and my_esp32s3_diy_oled variants. --- variants/my_esp32s3_diy_eink/platformio.ini | 4 +++- variants/my_esp32s3_diy_oled/platformio.ini | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/variants/my_esp32s3_diy_eink/platformio.ini b/variants/my_esp32s3_diy_eink/platformio.ini index e81f2c1ab..b2404566f 100644 --- a/variants/my_esp32s3_diy_eink/platformio.ini +++ b/variants/my_esp32s3_diy_eink/platformio.ini @@ -14,7 +14,9 @@ lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2@^1.5.1 adafruit/Adafruit NeoPixel @ ^1.12.0 -build_unflags = -DARDUINO_USB_MODE=1 +build_unflags = + ${esp32s3_base.build_unflags} + -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_eink diff --git a/variants/my_esp32s3_diy_oled/platformio.ini b/variants/my_esp32s3_diy_oled/platformio.ini index 2d7a5cd91..0fbbaa899 100644 --- a/variants/my_esp32s3_diy_oled/platformio.ini +++ b/variants/my_esp32s3_diy_oled/platformio.ini @@ -13,7 +13,9 @@ platform_packages = lib_deps = ${esp32_base.lib_deps} adafruit/Adafruit NeoPixel @ ^1.12.0 -build_unflags = -DARDUINO_USB_MODE=1 +build_unflags = + ${esp32s3_base.build_unflags} + -DARDUINO_USB_MODE=1 build_flags = ;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled ${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled