Skip to content

Commit 2c18a41

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 02d42f8 + c65eecc commit 2c18a41

51 files changed

Lines changed: 505 additions & 82 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/stale_bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Stale PR+Issues
20-
uses: actions/stale@v10.1.1
20+
uses: actions/stale@v10.2.0
2121
with:
2222
days-before-stale: 45
2323
stale-issue-message: This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.

.trunk/trunk.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ plugins:
88
uri: https://github.com/trunk-io/plugins
99
lint:
1010
enabled:
11-
- checkov@3.2.501
12-
- renovate@43.10.3
11+
- checkov@3.2.506
12+
- renovate@43.31.9
1313
- prettier@3.8.1
14-
- trufflehog@3.93.3
14+
- trufflehog@3.93.4
1515
- yamllint@1.38.0
1616
- bandit@1.9.3
1717
- trivy@0.69.1
1818
- taplo@0.10.0
19-
- ruff@0.15.1
20-
- isort@7.0.0
19+
- ruff@0.15.2
20+
- isort@8.0.0
2121
- markdownlint@0.47.0
2222
- oxipng@10.1.0
2323
- svgo@4.0.0
24-
- actionlint@1.7.10
24+
- actionlint@1.7.11
2525
- flake8@7.3.0
2626
- hadolint@2.14.0
2727
- shfmt@3.6.0

boards/mini-epaper-s3.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32s3_out.ld",
5+
"partitions": "default.csv"
6+
},
7+
"core": "esp32",
8+
"extra_flags": [
9+
"-DBOARD_HAS_PSRAM",
10+
"-DARDUINO_ESP32S3_DEV",
11+
"-DARDUINO_USB_MODE=1",
12+
"-DARDUINO_USB_CDC_ON_BOOT=1",
13+
"-DARDUINO_RUNNING_CORE=1",
14+
"-DARDUINO_EVENT_RUNNING_CORE=1"
15+
],
16+
"f_cpu": "240000000L",
17+
"f_flash": "80000000L",
18+
"flash_mode": "qio",
19+
"hwids": [["0x303A", "0x1001"]],
20+
"mcu": "esp32s3",
21+
"variant": "esp32s3"
22+
},
23+
"connectivity": ["wifi"],
24+
"debug": {
25+
"default_tool": "esp-builtin",
26+
"onboard_tools": ["esp-builtin"],
27+
"openocd_target": "esp32s3.cfg"
28+
},
29+
"frameworks": ["arduino", "espidf"],
30+
"name": "LilyGo Mini-Epaper-S3 (4 MB Flash, 2MB PSRAM)",
31+
"upload": {
32+
"flash_size": "4MB",
33+
"maximum_ram_size": 327680,
34+
"maximum_size": 4194304,
35+
"require_upload_port": true,
36+
"speed": 460800
37+
},
38+
"url": "https://www.lilygo.cc",
39+
"vendor": "LilyGo"
40+
}

src/concurrency/Periodic.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
#pragma once
22

3+
#include <functional>
4+
#include <utility>
5+
36
#include "concurrency/OSThread.h"
47

58
namespace concurrency
69
{
710

811
/**
9-
* @brief Periodically invoke a callback. This just provides C-style callback conventions
10-
* rather than a virtual function - FIXME, remove?
12+
* @brief Periodically invoke a callback.
13+
* Supports both legacy function pointers and modern callables.
1114
*/
1215
class Periodic : public OSThread
1316
{
14-
int32_t (*callback)();
15-
1617
public:
1718
// callback returns the period for the next callback invocation (or 0 if we should no longer be called)
18-
Periodic(const char *name, int32_t (*_callback)()) : OSThread(name), callback(_callback) {}
19+
Periodic(const char *name, int32_t (*cb)()) : OSThread(name), callback(cb) {}
20+
Periodic(const char *name, std::function<int32_t()> cb) : OSThread(name), callback(std::move(cb)) {}
1921

2022
protected:
21-
int32_t runOnce() override { return callback(); }
23+
int32_t runOnce() override { return callback ? callback() : 0; }
24+
25+
private:
26+
std::function<int32_t()> callback;
2227
};
2328

2429
} // namespace concurrency

src/graphics/EInkDisplay2.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,17 @@ bool EInkDisplay::connect()
259259
adafruitDisplay->setRotation(3);
260260
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
261261
}
262+
#elif defined(MINI_EPAPER_S3)
263+
spi1 = new SPIClass(HSPI);
264+
spi1->begin(PIN_SPI1_SCK, PIN_SPI1_MISO, PIN_SPI1_MOSI, PIN_EINK_CS);
265+
266+
// Create GxEPD2 objects
267+
auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *spi1);
268+
adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);
269+
270+
// Init GxEPD2
271+
adafruitDisplay->init();
272+
adafruitDisplay->setRotation(1);
262273
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
263274

264275
// Detect display model, before starting SPI

src/graphics/EInkDisplay2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class EInkDisplay : public OLEDDisplay
9393
SPIClass *hspi = NULL;
9494
#endif
9595

96-
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)
96+
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) || \
97+
defined(MINI_EPAPER_S3)
9798
SPIClass *spi1 = NULL;
9899
#endif
99100

src/graphics/Screen.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,10 @@ int32_t Screen::runOnce()
875875
break;
876876
case Cmd::STOP_ALERT_FRAME:
877877
NotificationRenderer::pauseBanner = false;
878+
// Return from one-off alert mode back to regular frames.
879+
if (!showingNormalScreen && NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {
880+
setFrames();
881+
}
878882
break;
879883
case Cmd::STOP_BOOT_SCREEN:
880884
EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); // E-Ink: Explicitly use full-refresh for next frame

src/mesh/MeshModule.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ class MeshModule
106106
/* We allow modules to ignore a request without sending an error if they have a specific reason for it. */
107107
bool ignoreRequest = false;
108108

109+
/**
110+
* Check if the current request is a multi-hop broadcast. Modules should call this in allocReply()
111+
* and return NULL to prevent reply storms from broadcast requests that have already been relayed.
112+
*/
113+
bool isMultiHopBroadcastRequest()
114+
{
115+
if (currentRequest && isBroadcast(currentRequest->to) && currentRequest->hop_limit < currentRequest->hop_start) {
116+
return true;
117+
}
118+
return false;
119+
}
120+
109121
/** If a bound channel name is set, we will only accept received packets that come in on that channel.
110122
* A special exception (FIXME, not sure if this is a good idea) - packets that arrive on the local interface
111123
* are allowed on any channel (this lets the local user do anything).

src/mesh/NodeDB.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ NodeDB::NodeDB()
322322
// Uncomment below to always enable UDP broadcasts
323323
// config.network.enabled_protocols = meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST;
324324

325-
// If we are setup to broadcast on the default channel, ensure that the telemetry intervals are coerced to the minimum value
326-
// of 30 minutes or more
327-
if (channels.isDefaultChannel(channels.getPrimaryIndex())) {
325+
// If we are setup to broadcast on any default channel slot (with default frequency slot semantics),
326+
// ensure that the telemetry intervals are coerced to the minimum value of 30 minutes or more.
327+
if (channels.hasDefaultChannel()) {
328328
LOG_DEBUG("Coerce telemetry to min of 30 minutes on defaults");
329329
moduleConfig.telemetry.device_update_interval = Default::getConfiguredOrMinimumValue(
330330
moduleConfig.telemetry.device_update_interval, min_default_telemetry_interval_secs);

0 commit comments

Comments
 (0)