Master --> develop (#8436)

* Issue: #7944 External notification module: Adjusted default nag timeout to 15s (from 60s) (#7946)

* External notification module: Adjusted default nag timeout to 5s (from 60s)

* Change nag to 15s

---------

Co-authored-by: Tom Fifield <tom@tomfifield.net>

* Add support for RAK WISMESH TAP V2 by enabling SDCARD_CS pin during deep sleep (#8429)

* Upgrade trunk (#8369)

Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>

* Don't assign negative SNR to unsigned int type

SNR-based contention windows are broken on systems with 64-bit long integers.
Fixes #8430

* Allow vibra or buzzer only notifications to obey cutoff (#8342)

* Allow vibra or buzzer only notifications to obey cutoff

* Update src/modules/ExternalNotificationModule.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* InkHUD crash fix when nodes get deleted from NodeDB (#8428)

* InkHUD crash fix

* trunk fix

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Onyx Clawe <58921814+OnyxClawe@users.noreply.github.com>
Co-authored-by: Daniel.Cao <144674500+DanielCao0@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: korbinianbauer <64415847+korbinianbauer@users.noreply.github.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
This commit is contained in:
Tom Fifield 2025-10-24 10:37:38 +11:00 committed by GitHub
parent 07d354fa02
commit 799cf0e8b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 25 additions and 12 deletions

View File

@ -8,15 +8,15 @@ plugins:
uri: https://github.com/trunk-io/plugins uri: https://github.com/trunk-io/plugins
lint: lint:
enabled: enabled:
- checkov@3.2.483 - checkov@3.2.486
- renovate@41.148.2 - renovate@41.157.0
- prettier@3.6.2 - prettier@3.6.2
- trufflehog@3.90.8 - trufflehog@3.90.11
- yamllint@1.37.1 - yamllint@1.37.1
- bandit@1.8.6 - bandit@1.8.6
- trivy@0.67.2 - trivy@0.67.2
- taplo@0.10.0 - taplo@0.10.0
- ruff@0.14.0 - ruff@0.14.1
- isort@7.0.0 - isort@7.0.0
- markdownlint@0.45.0 - markdownlint@0.45.0
- oxipng@9.1.5 - oxipng@9.1.5

View File

@ -127,6 +127,11 @@ void InkHUD::NodeListApplet::onRender()
// Y value (top) of the current card. Increases as we draw. // Y value (top) of the current card. Increases as we draw.
uint16_t cardTopY = headerDivY + padDivH; uint16_t cardTopY = headerDivY + padDivH;
// Clean up deleted nodes before drawing
cards.erase(
std::remove_if(cards.begin(), cards.end(), [](const CardInfo &c) { return nodeDB->getMeshNode(c.nodeNum) == nullptr; }),
cards.end());
// -- Each node in list -- // -- Each node in list --
for (auto card = cards.begin(); card != cards.end(); ++card) { for (auto card = cards.begin(); card != cards.end(); ++card) {
@ -141,6 +146,11 @@ void InkHUD::NodeListApplet::onRender()
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeNum); meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeNum);
// Skip deleted nodes
if (!node) {
continue;
}
// -- Shortname -- // -- Shortname --
// Parse special chars in the short name // Parse special chars in the short name
// Use "?" if unknown // Use "?" if unknown
@ -188,7 +198,7 @@ void InkHUD::NodeListApplet::onRender()
drawSignalIndicator(signalX, signalY, signalW, signalH, signal); drawSignalIndicator(signalX, signalY, signalW, signalH, signal);
} }
// Otherwise, print "hops away" info, if available // Otherwise, print "hops away" info, if available
else if (hopsAway != CardInfo::HOPS_UNKNOWN) { else if (hopsAway != CardInfo::HOPS_UNKNOWN && node) {
std::string hopString = to_string(node->hops_away); std::string hopString = to_string(node->hops_away);
hopString += " Hop"; hopString += " Hop";
if (node->hops_away != 1) if (node->hops_away != 1)

View File

@ -27,7 +27,7 @@
#ifdef USERPREFS_RINGTONE_NAG_SECS #ifdef USERPREFS_RINGTONE_NAG_SECS
#define default_ringtone_nag_secs USERPREFS_RINGTONE_NAG_SECS #define default_ringtone_nag_secs USERPREFS_RINGTONE_NAG_SECS
#else #else
#define default_ringtone_nag_secs 60 #define default_ringtone_nag_secs 15
#endif #endif
#define default_mqtt_address "mqtt.meshtastic.org" #define default_mqtt_address "mqtt.meshtastic.org"
@ -84,4 +84,4 @@ class Default
return 1.0 + (nodesOverForty * throttlingFactor); // Each number of online node scales by 0.075 (default) return 1.0 + (nodesOverForty * throttlingFactor); // Each number of online node scales by 0.075 (default)
} }
} }
}; };

View File

@ -272,10 +272,10 @@ uint32_t RadioInterface::getTxDelayMsec()
uint8_t RadioInterface::getCWsize(float snr) uint8_t RadioInterface::getCWsize(float snr)
{ {
// The minimum value for a LoRa SNR // The minimum value for a LoRa SNR
const uint32_t SNR_MIN = -20; const int32_t SNR_MIN = -20;
// The maximum value for a LoRa SNR // The maximum value for a LoRa SNR
const uint32_t SNR_MAX = 10; const int32_t SNR_MAX = 10;
return map(snr, SNR_MIN, SNR_MAX, CWmin, CWmax); return map(snr, SNR_MIN, SNR_MAX, CWmin, CWmax);
} }

View File

@ -94,8 +94,8 @@ int32_t ExternalNotificationModule::runOnce()
// audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop // audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop
isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying(); isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying();
#endif #endif
if ((nagCycleCutoff < millis()) && !isRtttlPlaying) { if ((nagCycleCutoff <= millis())) {
// let the song finish if we reach timeout // Turn off external notification immediately when timeout is reached, regardless of song state
nagCycleCutoff = UINT32_MAX; nagCycleCutoff = UINT32_MAX;
LOG_INFO("Turning off external notification: "); LOG_INFO("Turning off external notification: ");
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -103,7 +103,6 @@ int32_t ExternalNotificationModule::runOnce()
externalTurnedOn[i] = 0; externalTurnedOn[i] = 0;
LOG_INFO("%d ", i); LOG_INFO("%d ", i);
} }
LOG_INFO("");
#ifdef HAS_I2S #ifdef HAS_I2S
// GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library // GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library
// T-Deck uses GPIO0 as trackball button, so restore the mode // T-Deck uses GPIO0 as trackball button, so restore the mode

View File

@ -244,6 +244,10 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false, bool skipSaveN
// pinMode(PIN_POWER_EN1, INPUT_PULLDOWN); // pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
#endif #endif
#ifdef RAK_WISMESH_TAP_V2
digitalWrite(SDCARD_CS, LOW);
#endif
#ifdef TRACKER_T1000_E #ifdef TRACKER_T1000_E
#ifdef GNSS_AIROHA #ifdef GNSS_AIROHA
digitalWrite(GPS_VRTC_EN, LOW); digitalWrite(GPS_VRTC_EN, LOW);