From 3b6eefa8bbfcb2ae02e4e311b190cc2dfef9a05b Mon Sep 17 00:00:00 2001 From: Jacob Powers <5566081+powersjcb@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:45:34 -0600 Subject: [PATCH 1/4] feat: event mode - limit smart position updates to at most every 5m (#7505) * feat: event mode - limit smart position updates to at most every 5m * fix: convert 600 to 600000ms for 5min threshold * fix: correct 5min threshold to 300000ms --------- Co-authored-by: Ben Meadors --- src/modules/PositionModule.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/PositionModule.h b/src/modules/PositionModule.h index b9fd527c9..4a2415058 100644 --- a/src/modules/PositionModule.h +++ b/src/modules/PositionModule.h @@ -65,8 +65,15 @@ class PositionModule : public ProtobufModule, private concu bool hasGPS(); uint32_t lastSentReply = 0; // Last time we sent a position reply (used for reply throttling only) +#if USERPREFS_EVENT_MODE + // In event mode we want to prevent excessive position broadcasts + // we set the minimum interval to 5m + const uint32_t minimumTimeThreshold = + max(300000, Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30)); +#else const uint32_t minimumTimeThreshold = Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30); +#endif }; struct SmartPosition { From d1f3c3c9821bd6f6d2a1c1e0a64929d7458a703b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 4 Aug 2025 17:25:31 +0200 Subject: [PATCH 2/4] 128row display (#7511) * Fix 128 row monochrome display * trunk fmt * fix assignment --- src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 1868d98c7..f022c95d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -761,8 +761,17 @@ void setup() #if defined(USE_SH1107_128_64) screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 + screen_geometry = GEOMETRY_128_64; #endif + // if we have one of the fixed overrides in the settings, adjust display type accordingly. + if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107) { + screen_geometry = GEOMETRY_128_128; + } else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64) { + screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; + screen_geometry = GEOMETRY_128_64; + } + #if !MESHTASTIC_EXCLUDE_I2C #if !defined(ARCH_STM32WL) if (acc_info.type != ScanI2C::DeviceType::NONE) { @@ -808,7 +817,7 @@ void setup() #elif !defined(ARCH_ESP32) // ARCH_RP2040 SPI.begin(); #else - // ESP32 + // ESP32 #if defined(HW_SPI1_DEVICE) SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); From 0130899b3b76b48cfc0d396dcddc9bfc463c692f Mon Sep 17 00:00:00 2001 From: tg-mw <81423559+tg-mw@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:42:39 +0200 Subject: [PATCH 3/4] Fix Melopero RV3028 RTC Settings (#7524) --- src/detect/ScanI2CTwoWire.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 652d50d51..8b3670cd9 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -184,8 +184,13 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) type = RTC_RV3028; logFoundDevice("RV3028", (uint8_t)addr.address); rtc.initI2C(*i2cBus); - rtc.writeToRegister(0x35, 0x07); // no Clkout - rtc.writeToRegister(0x37, 0xB4); + // Update RTC EEPROM settings, if necessary + if (rtc.readEEPROMRegister(0x35) != 0x07) { + rtc.writeEEPROMRegister(0x35, 0x07); // no Clkout + } + if (rtc.readEEPROMRegister(0x37) != 0xB4) { + rtc.writeEEPROMRegister(0x37, 0xB4); + } break; #endif From 079286da048c295e3d46eb12eeaf31af80fb6fef Mon Sep 17 00:00:00 2001 From: Jason P Date: Mon, 4 Aug 2025 12:33:45 -0500 Subject: [PATCH 4/4] Only toggle screen wake, don't break banners (#7545) * Only toggle screen wake, don't break banners * Fix code - only needed a small line change --- src/graphics/Screen.cpp | 65 ++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index f22a0d8a8..33dc7efcc 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1264,40 +1264,39 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet) if (shouldWakeOnReceivedMessage()) { setOn(true); // Wake up the screen first forceDisplay(); // Forces screen redraw - - // === Prepare banner content === - const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet->from); - const char *longName = (node && node->has_user) ? node->user.long_name : nullptr; - - const char *msgRaw = reinterpret_cast(packet->decoded.payload.bytes); - - char banner[256]; - - // Check for bell character in message to determine alert type - bool isAlert = false; - for (size_t i = 0; i < packet->decoded.payload.size && i < 100; i++) { - if (msgRaw[i] == '\x07') { - isAlert = true; - break; - } - } - - if (isAlert) { - if (longName && longName[0]) { - snprintf(banner, sizeof(banner), "Alert Received from\n%s", longName); - } else { - strcpy(banner, "Alert Received"); - } - } else { - if (longName && longName[0]) { - snprintf(banner, sizeof(banner), "New Message from\n%s", longName); - } else { - strcpy(banner, "New Message"); - } - } - - screen->showSimpleBanner(banner, 3000); } + // === Prepare banner content === + const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet->from); + const char *longName = (node && node->has_user) ? node->user.long_name : nullptr; + + const char *msgRaw = reinterpret_cast(packet->decoded.payload.bytes); + + char banner[256]; + + // Check for bell character in message to determine alert type + bool isAlert = false; + for (size_t i = 0; i < packet->decoded.payload.size && i < 100; i++) { + if (msgRaw[i] == '\x07') { + isAlert = true; + break; + } + } + + if (isAlert) { + if (longName && longName[0]) { + snprintf(banner, sizeof(banner), "Alert Received from\n%s", longName); + } else { + strcpy(banner, "Alert Received"); + } + } else { + if (longName && longName[0]) { + snprintf(banner, sizeof(banner), "New Message from\n%s", longName); + } else { + strcpy(banner, "New Message"); + } + } + + screen->showSimpleBanner(banner, 3000); } }