From 9e3a9c370da2b009e865aeb821ecad4c6eb1f6a8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 6 Jun 2026 14:15:49 -0500 Subject: [PATCH 1/6] Enhance RTC handling with unit test support for system time fallback (#10642) * Enhance RTC handling with unit test support for system time fallback * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> (cherry picked from commit c7f17a80b26a4a0ef151f5c1ba9342e7e1e205ed) --- src/gps/RTC.cpp | 99 ++++++++++++++++++++++++++++++++----- src/gps/RTC.h | 4 ++ test/test_rtc/test_main.cpp | 82 ++++++++++++++++++++++++++++++ 3 files changed, 173 insertions(+), 12 deletions(-) create mode 100644 test/test_rtc/test_main.cpp diff --git a/src/gps/RTC.cpp b/src/gps/RTC.cpp index 78439a50a..ad0bdec04 100644 --- a/src/gps/RTC.cpp +++ b/src/gps/RTC.cpp @@ -31,13 +31,63 @@ static uint32_t timeStartMsec; // Once we have a GPS lock, this is where we hold the initial msec clock that corresponds to that time static uint64_t zeroOffsetSecs; // GPS based time in secs since 1970 - only updated once on initial lock +#ifdef PIO_UNIT_TESTING +// Test seam: unit tests can inject a fake system clock (e.g. the uptime seconds that +// gettimeofday() returns on boards without a real RTC, like RP2040) and force readFromRTC() +// down the no-hardware-RTC fallback even when a hardware-RTC branch is compiled in. +static bool hasMockSystemTime = false; +static bool forceSystemTimeFallback = false; +static struct timeval mockSystemTime = {}; +#endif + +// Reads the platform system clock (or the injected mock during unit tests). Used only by the +// no-hardware-RTC fallback below, so it may be unused on builds with a hardware RTC. +[[maybe_unused]] static bool readSystemTime(struct timeval *tv) +{ +#ifdef PIO_UNIT_TESTING + if (hasMockSystemTime) { + *tv = mockSystemTime; + return true; + } +#endif + return gettimeofday(tv, NULL) == 0; +} + +// Seeds the clock from the system time on boards without a hardware RTC. gettimeofday() can +// return uptime rather than wall-clock time there (e.g. RP2040), so only adopt it when we have +// nothing better yet -- never clobber a higher-quality GPS/NTP/phone source (issue #9828). +[[maybe_unused]] static RTCSetResult readFromSystemTimeFallback() +{ + struct timeval tv; + if (readSystemTime(&tv)) { + uint32_t now = millis(); + uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms + if (currentQuality == RTCQualityNone) { + LOG_DEBUG("Seed time from system clock: %lu", (unsigned long)printableEpoch); + timeStartMsec = now; + zeroOffsetSecs = tv.tv_sec; + } else { + LOG_DEBUG("Ignore system clock fallback (%lu); current RTC quality is %s", (unsigned long)printableEpoch, + RtcName(currentQuality)); + } + return RTCSetResultSuccess; + } + return RTCSetResultNotSet; +} + /** - * Reads the current date and time from the RTC module and updates the system time. - * @return True if the RTC was successfully read and the system time was updated, false otherwise. + * Reads date/time from the RTC module (or system-time fallback) and seeds internal timekeeping. + * @return RTCSetResultSuccess if a time source was read successfully (even if an existing higher-quality time is retained). */ RTCSetResult readFromRTC() { - struct timeval tv; /* btw settimeofday() is helpful here too*/ +#ifdef PIO_UNIT_TESTING + if (forceSystemTimeFallback) { + return readFromSystemTimeFallback(); + } +#endif + + [[maybe_unused]] struct timeval tv; /* btw settimeofday() is helpful here too*/ #ifdef RV3028_RTC if (rtc_found.address == RV3028_RTC) { uint32_t now = millis(); @@ -162,14 +212,7 @@ RTCSetResult readFromRTC() } } #else - if (!gettimeofday(&tv, NULL)) { - uint32_t now = millis(); - uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms - LOG_DEBUG("Read RTC time as %ld", printableEpoch); - timeStartMsec = now; - zeroOffsetSecs = tv.tv_sec; - return RTCSetResultSuccess; - } + return readFromSystemTimeFallback(); #endif return RTCSetResultNotSet; } @@ -292,7 +335,7 @@ RTCSetResult perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpd LOG_WARN("Failed to set time for RX8130CE"); } } -#elif defined(ARCH_ESP32) +#elif defined(ARCH_ESP32) || defined(ARCH_RP2040) settimeofday(tv, NULL); #endif @@ -423,6 +466,38 @@ void setBootRelativeTimeForUnitTest(uint32_t secondsSinceBoot) lastSetFromPhoneNtpOrGps = 0; lastTimeValidationWarning = 0; } + +void clearRTCSystemTimeForTests() +{ + hasMockSystemTime = false; + mockSystemTime = {}; +} + +void setRTCSystemTimeForTests(const struct timeval *tv) +{ + if (tv == NULL) { + clearRTCSystemTimeForTests(); + return; + } + mockSystemTime = *tv; + hasMockSystemTime = true; +} + +void setReadFromRTCUseSystemTimeForTests(bool enabled) +{ + forceSystemTimeFallback = enabled; +} + +void resetRTCStateForTests() +{ + currentQuality = RTCQualityNone; + timeStartMsec = 0; + zeroOffsetSecs = 0; + lastSetFromPhoneNtpOrGps = 0; + lastTimeValidationWarning = 0; + setReadFromRTCUseSystemTimeForTests(false); + clearRTCSystemTimeForTests(); +} #endif time_t gm_mktime(const struct tm *tm) diff --git a/src/gps/RTC.h b/src/gps/RTC.h index cd1e1d002..b69a99ec9 100644 --- a/src/gps/RTC.h +++ b/src/gps/RTC.h @@ -56,6 +56,10 @@ RTCSetResult readFromRTC(); #ifdef PIO_UNIT_TESTING void setBootRelativeTimeForUnitTest(uint32_t secondsSinceBoot); +void resetRTCStateForTests(); +void setRTCSystemTimeForTests(const struct timeval *tv); +void clearRTCSystemTimeForTests(); +void setReadFromRTCUseSystemTimeForTests(bool enabled); #endif time_t gm_mktime(const struct tm *tm); diff --git a/test/test_rtc/test_main.cpp b/test/test_rtc/test_main.cpp new file mode 100644 index 000000000..02cad01c4 --- /dev/null +++ b/test/test_rtc/test_main.cpp @@ -0,0 +1,82 @@ +#include "TestUtil.h" +#include "gps/RTC.h" +#include +#include +#include + +// Regression coverage for issue #9828: on boards without a hardware RTC (e.g. RP2040), +// gettimeofday() can return uptime seconds rather than wall-clock time. A later readFromRTC() +// must not overwrite a higher-quality network/GPS time with that value, but it should still seed +// the clock when nothing better exists yet. +// +// The native test build compiles the RV3028 hardware-RTC branch (variants/native/portduino +// defines RV3028_RTC), so these tests use setReadFromRTCUseSystemTimeForTests() to force the +// no-hardware-RTC fallback path and setRTCSystemTimeForTests() to inject a deterministic clock. + +static const uint32_t kAllowedDriftSeconds = 2; +static const time_t kUptimeSeconds = 21; // what gettimeofday() returns on RP2040 without a real clock + +// A clearly-valid wall-clock epoch, safely inside any BUILD_EPOCH validity window. +static time_t makeValidEpoch() +{ + return time(NULL) + SEC_PER_DAY; +} + +void setUp(void) +{ + resetRTCStateForTests(); +} + +void tearDown(void) +{ + resetRTCStateForTests(); +} + +// A higher-quality network time must survive a later system-time read that only knows uptime. +static void test_readFromRTC_preserves_better_network_time(void) +{ + const time_t networkEpoch = makeValidEpoch(); + struct timeval networkTime; + networkTime.tv_sec = networkEpoch; + networkTime.tv_usec = 0; + TEST_ASSERT_EQUAL_INT(RTCSetResultSuccess, perhapsSetRTC(RTCQualityFromNet, &networkTime)); + + // Simulate a later readFromRTC() falling back to a system clock that only knows uptime. + struct timeval uptime; + uptime.tv_sec = kUptimeSeconds; + uptime.tv_usec = 0; + setRTCSystemTimeForTests(&uptime); + setReadFromRTCUseSystemTimeForTests(true); + + TEST_ASSERT_EQUAL_INT(RTCSetResultSuccess, readFromRTC()); + TEST_ASSERT_EQUAL_INT(RTCQualityFromNet, getRTCQuality()); + TEST_ASSERT_UINT32_WITHIN(kAllowedDriftSeconds, (uint32_t)networkEpoch, getValidTime(RTCQualityFromNet)); +} + +// Before any higher-quality source exists, the fallback should still seed the clock. +static void test_readFromRTC_initializes_time_when_no_better_source(void) +{ + const time_t systemEpoch = makeValidEpoch(); + struct timeval systemTime; + systemTime.tv_sec = systemEpoch; + systemTime.tv_usec = 0; + setRTCSystemTimeForTests(&systemTime); + setReadFromRTCUseSystemTimeForTests(true); + + TEST_ASSERT_EQUAL_INT(RTCSetResultSuccess, readFromRTC()); + TEST_ASSERT_EQUAL_INT(RTCQualityNone, getRTCQuality()); + TEST_ASSERT_UINT32_WITHIN(kAllowedDriftSeconds, (uint32_t)systemEpoch, getTime()); +} + +void setup() +{ + delay(10); + initializeTestEnvironment(); + + UNITY_BEGIN(); + RUN_TEST(test_readFromRTC_preserves_better_network_time); + RUN_TEST(test_readFromRTC_initializes_time_when_no_better_source); + exit(UNITY_END()); +} + +void loop() {} From 245b45fff3fea8466862c928dec8783451b01d5e Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 10 Jun 2026 13:59:55 -0400 Subject: [PATCH 2/6] meshtasticd: Add configs for B&Q Station G3 (#10673) configs for raspberry pi and luckfox lyra zero Co-authored-by: Ben Meadors (cherry picked from commit bfc206a47b64738575b8039733e663218870398b) --- ...lyra-zero-BQ-SG3-BQ35LORA900V1M-slot1.yaml | 29 +++++++++++++++++++ .../lora-rpi-BQ-SG3-BQ35LORA900V1M-slot1.yaml | 17 +++++++++++ 2 files changed, 46 insertions(+) create mode 100644 bin/config.d/lora-lyra-zero-BQ-SG3-BQ35LORA900V1M-slot1.yaml create mode 100644 bin/config.d/lora-rpi-BQ-SG3-BQ35LORA900V1M-slot1.yaml diff --git a/bin/config.d/lora-lyra-zero-BQ-SG3-BQ35LORA900V1M-slot1.yaml b/bin/config.d/lora-lyra-zero-BQ-SG3-BQ35LORA900V1M-slot1.yaml new file mode 100644 index 000000000..0bee549e4 --- /dev/null +++ b/bin/config.d/lora-lyra-zero-BQ-SG3-BQ35LORA900V1M-slot1.yaml @@ -0,0 +1,29 @@ +# Station G3 + BQ35LORA900V1M Primary Slot +# Board Doc: https://wiki.bqvoy.com/en/devkits/station-g3 +Meta: + name: B&Q Station G3 + BQ35LORA900V1M Primary Slot + support: official + compatible: + - luckfox-lyra-zero-w # Armbian + +Lora: + Module: sx1262 + IRQ: # GPIO0_A5 (physical 15) + pin: 5 + gpiochip: 0 + line: 5 + Reset: # GPIO1_D1 (physical 36) + pin: 57 + gpiochip: 1 + line: 25 + Busy: # GPIO0_B4 (physical 18) + pin: 12 + gpiochip: 0 + line: 12 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true + spidev: spidev0.0 + # CS: # GPIO0_B2 (physical 24) + # pin: 10 + # gpiochip: 0 + # line: 10 diff --git a/bin/config.d/lora-rpi-BQ-SG3-BQ35LORA900V1M-slot1.yaml b/bin/config.d/lora-rpi-BQ-SG3-BQ35LORA900V1M-slot1.yaml new file mode 100644 index 000000000..d58889517 --- /dev/null +++ b/bin/config.d/lora-rpi-BQ-SG3-BQ35LORA900V1M-slot1.yaml @@ -0,0 +1,17 @@ +# Station G3 + BQ35LORA900V1M Primary Slot +# Board Doc: https://wiki.bqvoy.com/en/devkits/station-g3 +Meta: + name: B&Q Station G3 + BQ35LORA900V1M Primary Slot + support: official + compatible: + - raspberry-pi + +Lora: + Module: sx1262 + IRQ: 22 + Reset: 16 + Busy: 24 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true + spidev: spidev0.0 + #CS: 8 From b603ed0bbf0db0dc564c4e30053a39a1d636ad5a Mon Sep 17 00:00:00 2001 From: Littleaton <55291686+Littleaton@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:22:45 -0600 Subject: [PATCH 3/6] Additional *RAK* missing values for 6421 / 13300 13302 modules + Zebra/Nebra Hat Configs (#10644) * rebased to master * Update bin/config.d/lora-ZebraHat_2W.yaml Co-authored-by: Austin * Update bin/config.d/lora-ZebraHat_1W.yaml Co-authored-by: Austin * Update bin/config.d/lora-NebraHat_2W.yaml Co-authored-by: Austin * Update bin/config.d/lora-NebraHat_1W.yaml Co-authored-by: Austin * Remove TX_GAIN_LORA configuration line * Remove TX_GAIN_LORA configuration line * Comment out TX_GAIN_LORA configuration * Comment out TX_GAIN_LORA configuration * Update lora-ok3506-RAK6421-13300-slot1.yaml * Update lora-ok3506-RAK6421-13300-slot2.yaml * Update lora-RAK6421-13300-slot1.yaml * Update lora-RAK6421-13300-slot2.yaml --------- Co-authored-by: Austin (cherry picked from commit a49729eb89007992201007792b1e728f6dabd12b) --- bin/config.d/lora-NebraHat_1W.yaml | 19 ++++++++++++++++++ bin/config.d/lora-NebraHat_2W.yaml | 20 +++++++++++++++++++ bin/config.d/lora-RAK6421-13300-slot1.yaml | 2 +- bin/config.d/lora-RAK6421-13300-slot2.yaml | 2 +- bin/config.d/lora-ZebraHat_1W.yaml | 19 ++++++++++++++++++ bin/config.d/lora-ZebraHat_2W.yaml | 20 +++++++++++++++++++ .../lora-ecb41-pge-RAK6421-13300-slot2.yaml | 2 ++ .../lora-ecb41-pge-RAK6421-13302-slot2.yaml | 2 ++ .../lora-lyra-zero-RAK6421-13300-slot2.yaml | 2 ++ .../lora-lyra-zero-RAK6421-13302-slot2.yaml | 2 ++ .../lora-ok3506-RAK6421-13300-slot2.yaml | 2 ++ .../lora-ok3506-RAK6421-13302-slot2.yaml | 2 ++ bin/config.d/lora-usb-meshtoad-e22.yaml | 2 ++ 13 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 bin/config.d/lora-NebraHat_1W.yaml create mode 100644 bin/config.d/lora-NebraHat_2W.yaml create mode 100644 bin/config.d/lora-ZebraHat_1W.yaml create mode 100644 bin/config.d/lora-ZebraHat_2W.yaml diff --git a/bin/config.d/lora-NebraHat_1W.yaml b/bin/config.d/lora-NebraHat_1W.yaml new file mode 100644 index 000000000..9f3393713 --- /dev/null +++ b/bin/config.d/lora-NebraHat_1W.yaml @@ -0,0 +1,19 @@ +# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/NebraHat +# Use for 1 watt hat +Meta: + name: NebraHat 1W + support: community + compatible: + - raspberry-pi + +Lora: + Module: sx1262 # Nebra SX1262 Pi Hat - 1W + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true +# CS: 8 # Newer version of MeshtasticD do not need this? If issues uncomment this line + IRQ: 22 + Busy: 4 + Reset: 18 + RXen: 25 +I2C: + I2CDevice: /dev/i2c-1 \ No newline at end of file diff --git a/bin/config.d/lora-NebraHat_2W.yaml b/bin/config.d/lora-NebraHat_2W.yaml new file mode 100644 index 000000000..4b712dd8a --- /dev/null +++ b/bin/config.d/lora-NebraHat_2W.yaml @@ -0,0 +1,20 @@ +# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/NebraHat +# Use for 2 watt hat +Meta: + name: NebraHat 2W + support: community + compatible: + - raspberry-pi + +Lora: + Module: sx1262 # Nebra SX1262 Pi Hat - 2W + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true + SX126X_MAX_POWER: 8 +# CS: 8 # Newer version of MeshtasticD do not need this? If issues uncomment this line + IRQ: 22 + Busy: 4 + Reset: 18 + RXen: 25 +I2C: + I2CDevice: /dev/i2c-1 \ No newline at end of file diff --git a/bin/config.d/lora-RAK6421-13300-slot1.yaml b/bin/config.d/lora-RAK6421-13300-slot1.yaml index a88544896..086dadbc5 100644 --- a/bin/config.d/lora-RAK6421-13300-slot1.yaml +++ b/bin/config.d/lora-RAK6421-13300-slot1.yaml @@ -18,4 +18,4 @@ Lora: DIO3_TCXO_VOLTAGE: true DIO2_AS_RF_SWITCH: true spidev: spidev0.0 - # CS: 8 \ No newline at end of file + # CS: 8 diff --git a/bin/config.d/lora-RAK6421-13300-slot2.yaml b/bin/config.d/lora-RAK6421-13300-slot2.yaml index 5fa3a7126..c0ed9017a 100644 --- a/bin/config.d/lora-RAK6421-13300-slot2.yaml +++ b/bin/config.d/lora-RAK6421-13300-slot2.yaml @@ -18,4 +18,4 @@ Lora: DIO3_TCXO_VOLTAGE: true DIO2_AS_RF_SWITCH: true spidev: spidev0.1 - # CS: 7 \ No newline at end of file + # CS: 7 diff --git a/bin/config.d/lora-ZebraHat_1W.yaml b/bin/config.d/lora-ZebraHat_1W.yaml new file mode 100644 index 000000000..f0b3c34d3 --- /dev/null +++ b/bin/config.d/lora-ZebraHat_1W.yaml @@ -0,0 +1,19 @@ +# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/ZebraHAT +# Use for 1 watt hat +Meta: + name: ZebraHat 1W + support: community + compatible: + - raspberry-pi + +Lora: + Module: sx1262 # Zebra SX1262 Pi Hat - 1W + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true + SX126X_MAX_POWER: 18 + CS: 24 + IRQ: 22 + Busy: 27 + Reset: 17 +I2C: + I2CDevice: /dev/i2c-1 diff --git a/bin/config.d/lora-ZebraHat_2W.yaml b/bin/config.d/lora-ZebraHat_2W.yaml new file mode 100644 index 000000000..fe556ea77 --- /dev/null +++ b/bin/config.d/lora-ZebraHat_2W.yaml @@ -0,0 +1,20 @@ +# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/ZebraHAT +# Use for 2 watt hat +Meta: + name: ZebraHat 2W + support: community + compatible: + - raspberry-pi + +Lora: + Module: sx1262 # Zebra SX1262 Pi Hat - 2W + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true + SX126X_MAX_POWER: 8 + CS: 24 + IRQ: 22 + Busy: 27 + Reset: 17 + RXen: 25 +I2C: + I2CDevice: /dev/i2c-1 diff --git a/bin/config.d/lora-ecb41-pge-RAK6421-13300-slot2.yaml b/bin/config.d/lora-ecb41-pge-RAK6421-13300-slot2.yaml index e0ef946d9..5121e8a61 100644 --- a/bin/config.d/lora-ecb41-pge-RAK6421-13300-slot2.yaml +++ b/bin/config.d/lora-ecb41-pge-RAK6421-13300-slot2.yaml @@ -29,6 +29,8 @@ Lora: - pin: 50 # GPIO1_C2 (physical 16) gpiochip: 1 line: 18 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_A7 (SPI1_CSN1, physical 26) # pin: 7 diff --git a/bin/config.d/lora-ecb41-pge-RAK6421-13302-slot2.yaml b/bin/config.d/lora-ecb41-pge-RAK6421-13302-slot2.yaml index 5548bc5c7..0417d36e9 100644 --- a/bin/config.d/lora-ecb41-pge-RAK6421-13302-slot2.yaml +++ b/bin/config.d/lora-ecb41-pge-RAK6421-13302-slot2.yaml @@ -29,6 +29,8 @@ Lora: - pin: 50 # GPIO1_C2 (physical 16) gpiochip: 1 line: 18 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_A7 (SPI1_CSN1, physical 26) # pin: 7 diff --git a/bin/config.d/lora-lyra-zero-RAK6421-13300-slot2.yaml b/bin/config.d/lora-lyra-zero-RAK6421-13300-slot2.yaml index 255a3eca3..63648432c 100644 --- a/bin/config.d/lora-lyra-zero-RAK6421-13300-slot2.yaml +++ b/bin/config.d/lora-lyra-zero-RAK6421-13300-slot2.yaml @@ -29,6 +29,8 @@ Lora: - pin: 13 # GPIO0_B5 gpiochip: 0 line: 13 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_B1 # pin: 9 diff --git a/bin/config.d/lora-lyra-zero-RAK6421-13302-slot2.yaml b/bin/config.d/lora-lyra-zero-RAK6421-13302-slot2.yaml index 773a35ab0..d3baebd45 100644 --- a/bin/config.d/lora-lyra-zero-RAK6421-13302-slot2.yaml +++ b/bin/config.d/lora-lyra-zero-RAK6421-13302-slot2.yaml @@ -29,6 +29,8 @@ Lora: - pin: 13 # GPIO0_B5 gpiochip: 0 line: 13 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_B1 # pin: 9 diff --git a/bin/config.d/lora-ok3506-RAK6421-13300-slot2.yaml b/bin/config.d/lora-ok3506-RAK6421-13300-slot2.yaml index 969c20ad3..225fb5f8d 100644 --- a/bin/config.d/lora-ok3506-RAK6421-13300-slot2.yaml +++ b/bin/config.d/lora-ok3506-RAK6421-13300-slot2.yaml @@ -31,6 +31,8 @@ Lora: - pin: 103 # GPIO3_A7 (physical 16) gpiochip: 3 line: 7 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_B7 (SPI0_CSN1, physical 26) # pin: 15 diff --git a/bin/config.d/lora-ok3506-RAK6421-13302-slot2.yaml b/bin/config.d/lora-ok3506-RAK6421-13302-slot2.yaml index 36b70658b..ffb221fba 100644 --- a/bin/config.d/lora-ok3506-RAK6421-13302-slot2.yaml +++ b/bin/config.d/lora-ok3506-RAK6421-13302-slot2.yaml @@ -31,6 +31,8 @@ Lora: - pin: 103 # GPIO3_A7 (physical 16) gpiochip: 3 line: 7 + DIO3_TCXO_VOLTAGE: true + DIO2_AS_RF_SWITCH: true spidev: spidev0.1 # CS: # GPIO0_B7 (SPI0_CSN1, physical 26) # pin: 15 diff --git a/bin/config.d/lora-usb-meshtoad-e22.yaml b/bin/config.d/lora-usb-meshtoad-e22.yaml index 49182c83e..3d8b15783 100644 --- a/bin/config.d/lora-usb-meshtoad-e22.yaml +++ b/bin/config.d/lora-usb-meshtoad-e22.yaml @@ -1,3 +1,5 @@ +# This config works with all revisions of the Meshtoad USB radio. + Meta: name: meshtoad-e22 support: official From 434225eb011809afb3df1716c629850d1b490bc8 Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Sat, 20 Jun 2026 20:15:11 +0200 Subject: [PATCH 4/6] tdeck touch driver fix (#10740) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit 4044f4af6c721c8808cd1aa41bf1d348027d803c) --- variants/esp32s3/t-deck/platformio.ini | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/variants/esp32s3/t-deck/platformio.ini b/variants/esp32s3/t-deck/platformio.ini index a7701549f..6ee5a9e54 100644 --- a/variants/esp32s3/t-deck/platformio.ini +++ b/variants/esp32s3/t-deck/platformio.ini @@ -55,9 +55,9 @@ build_flags = -D HAS_TFT=1 -D USE_I2S_BUZZER -D RAM_SIZE=5120 - -D LV_LVGL_H_INCLUDE_SIMPLE - -D LV_CONF_INCLUDE_SIMPLE - -D LV_COMP_CONF_INCLUDE_SIMPLE + -D LV_LVGL_H_INCLUDE_SIMPLE + -D LV_CONF_INCLUDE_SIMPLE + -D LV_COMP_CONF_INCLUDE_SIMPLE -D LV_USE_SYSMON=0 -D LV_USE_PROFILER=0 -D LV_USE_PERF_MONITOR=0 @@ -72,6 +72,7 @@ build_flags = ; -D CALIBRATE_TOUCH=0 -D LGFX_SCREEN_WIDTH=240 -D LGFX_SCREEN_HEIGHT=320 + -D LGFX_BUFSIZE=153600 -D DISPLAY_SIZE=320x240 ; landscape mode -D LGFX_DRIVER=LGFX_TDECK -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_T_DECK.h\" @@ -79,13 +80,11 @@ build_flags = ; -D GFX_DRIVER_INC=\"graphics/LVGL/LVGL_T_DECK.h\" ; -D LV_USE_ST7789=1 -D VIEW_320x240 -; -D USE_DOUBLE_BUFFER -D USE_PACKET_API -D MAP_FULL_REDRAW - -D CUSTOM_TOUCH_DRIVER +; -D CUSTOM_TOUCH_DRIVER lib_deps = ${env:t-deck.lib_deps} ${device-ui_base.lib_deps} - # renovate: datasource=github-tags depName=bb_captouch packageName=bitbank2/bb_captouch - https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip + ;https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip From 41cbb45cdcc34f35dd90aa7bb412bda739ef9ae7 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 23 Jun 2026 06:03:37 -0500 Subject: [PATCH 5/6] Fix build on picomputer (cherry picked from commit 22d08b4303a9bd41872420b35fe523b5a811e4eb) --- variants/esp32s3/picomputer-s3/platformio.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/variants/esp32s3/picomputer-s3/platformio.ini b/variants/esp32s3/picomputer-s3/platformio.ini index b5a4ff178..11bae2e7c 100644 --- a/variants/esp32s3/picomputer-s3/platformio.ini +++ b/variants/esp32s3/picomputer-s3/platformio.ini @@ -37,6 +37,9 @@ extends = env:picomputer-s3 build_flags = ${env:picomputer-s3.build_flags} -D MESHTASTIC_EXCLUDE_WEBSERVER=1 + ; device-ui's I2CKeyboardScanner unconditionally calls Wire.begin(I2C_SDA, I2C_SCL); + -D I2C_SDA=8 + -D I2C_SCL=9 -D INPUTDRIVER_MATRIX_TYPE=1 -D USE_PIN_BUZZER=PIN_BUZZER -D USE_SX127x From 3c68c2eed9a1e06a86b88e85dd95f4ffe313821d Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 2 Jun 2026 18:12:27 -0400 Subject: [PATCH 6/6] Debian: Correctly build without signing (for forks) (#10605) (cherry picked from commit 266c143359273fd4303989b650b297fd3481f093) --- debian/ci_pack_sdeb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index d35aeef24..9aa018257 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -33,5 +33,5 @@ if [[ -n $GPG_KEY_ID ]]; then debuild -S -nc -k"$GPG_KEY_ID" else # Build the source deb without signing (forks) - debuild -S -nc + debuild -S -nc -us -uc fi