Extract the inline cursor-walk in handleRegionCmd into file-local
helpers (skipSpaces, rtrimSpaces, takeToken, splitNameJump,
processRegionDefSegment), grouped immediately above the consumer.
Behavior is identical; addresses PR #2540 review feedback on
readability.
Tighten the region def docs: collapse five Note callouts into three
grouped paragraphs (Behavior / Existing regions / Limits), add a
case-sensitivity caveat plus an error example, note the cursor reset
between split commands, and use generic placeholder names.
Modified the alert PSK command handling to only respond when the sender timestamp is zero, ensuring that the PSK is processed exclusively from the serial command line. This change enhances security and clarity in the command processing logic.
- Introduced a new method `formatIsoTimestampForMqtt` to centralize ISO-like timestamp formatting for MQTT messages, applying timezone preferences.
- Updated `buildStatusMessage`, `buildPacketJSON`, `buildPacketJSONFromRaw`, and `buildRawJSON` methods to utilize the new timestamp formatting function, improving code clarity and reducing redundancy.
- Adjusted `publishStatusToSlot` and `publishStatus` in MQTTBridge to use the new timestamp formatting method, ensuring consistent timestamp handling across status messages.
- LilyGo T-LoRa V2.1 observer envs: set ESP32_CPU_FREQ=240 and
MQTT_TASK_STACK_SIZE=16384 only for those targets so classic ESP32
TLS + JWT connect fits the FreeRTOS task; other boards keep the
default 8192 B unless overridden.
- MQTTBridge: use large JSON stack fallbacks only for PSRAM builds when
heap-backed buffers may be null; non-PSRAM paths use the inline
member buffers only, cutting peak stack in status/packet/raw publish.
- MQTTBridge.h: update the StaticJsonDocument comment (no longer refers
to an 8 KiB MQTT task stack).
Updated the alert PSK implementation to remove base64 support, now requiring a 32-character hex format for private channel secrets. Adjusted related CLI commands, error messages, and internal handling to ensure consistency with the new format. This change enhances clarity and aligns with the mobile app's "Share Channel" output. Relevant updates made across multiple files, including documentation and preference handling.
Enhanced the CLI command for setting the alert PSK to support both base64 (24/44 chars) and hex (32/64 chars) formats. This change allows for greater flexibility in key input, accommodating the mobile app's "share" output. Updated error messages for clarity and ensured that previously derived hashtags are cleared when a new PSK is set. Relevant adjustments made in CommonCLI and MQTT implementation documentation.
Add a new command `region bulk` for defining region hierarchies in a single line. This command allows users to create multiple regions in a single message. Updated the documentation to include usage examples and detailed parameter descriptions.
Modified the sendFlood method in AlertReporter to incorporate path hash size, ensuring compatibility with the repeater's configured path.hash.mode. This change enhances the handling of alert floods by accommodating different regional mesh configurations.
Updated the fault alert functionality to include an optional region name for scoping alert floods, allowing operators to override the default scope. Introduced a list of banned channels (e.g., Public PSK, `#test`, `#bot`) to prevent spamming community channels with alerts. The implementation ensures that alerts are only sent to private PSKs or non-banned hashtags. Relevant changes were made across multiple files, including updates to the CLI for setting and retrieving the new `alert.region` preference.
Implemented a new fault alert system that broadcasts notifications over LoRa when WiFi or MQTT connections are down for a specified duration. The alerts are configurable via CLI commands, allowing operators to set private PSKs or hashtags for alert channels. Default settings for alert thresholds and intervals are established, and the system ensures that alerts do not spam the public channel. Updated relevant files to integrate this feature into the MyMesh implementations and CLI handling.
Implemented a new function to strip surrounding quotes from strings in TxtDataHelpers, enhancing string manipulation capabilities. Updated CommonCLI to handle MQTT origin configuration, allowing for both setting and clearing of the mqtt.origin preference. This change improves the flexibility of MQTT origin management in the CLI.
Updated the MQTT message structure to add a new field for repeat status, allowing the indication of forwarding status as "on" or "off". This change includes modifications to the MQTTMessageBuilder and related documentation to reflect the new parameter. Additionally, updated CLI command documentation to clarify flooding behavior in different firmware versions.
Updated MyMesh implementations in simple_repeater and simple_room_server to set mqtt_origin to an empty string, allowing the effective origin to follow node_name during publishing. Introduced new functions in MQTTBridge to manage effective origin retrieval and refresh from preferences, ensuring consistent behavior across MQTT operations. This change simplifies the origin management and enhances clarity in the codebase.
This slipped through in PR #2327 and I noticed because the TechoBoard.h
for my variant doesn't include the Wire header, so the source file
in question does not coincidentally obtain a copy.
The `::init` method in the Adafruit ST7789 library is responsible to
initialize the device. This includes performing a reset, which can be
found in the Adafruit source for `Adafruit_SPITFT`.
Before this change, MeshCore performed its own ST7789 display reset
sequence, which consisted of three steps.
* Pull reset low
* Wait 10ms
* Pull reset high
Importantly, there was no fixed delay after pulling reset high. The
ST7789 driver requires a delay (T<sub>RT</sub>) of 5ms in Sleep In Mode
and 120ms in Sleep Out Mode before it will properly receive commands.
When `Adafruit_SPITFT` resets the device after MeshCore has already
reset it, the mandatory time may not have elapsed, leading to strange
behavior. In the author's case, this issue caused the initial
`fillScreen` to fail, such that the display showed an uninitialized
framebuffer.
This removes the MeshCore delay, leaving the responsibility of reset to
`Adafruit_SPITFT`, where they have the correct delays in place with
extra safety margin. The change was briefly tested by Josiah VanderZee
and Ben Zignego on a custom hardware build using an nRF52840 Dongle and
an Adafruit 4311 TFT display. The user button seemed to behave
strangely, but the display looked correct.
Increased the total number of built-in MQTT presets from 12 to 13 by adding the ColoradoMesh preset. This addition enhances the MQTT bridge's capabilities for connecting to more networks.
Enhanced the MQTTBridge error handling by adding several missing error codes for Wi-Fi and TLS errors, improving the clarity of error reporting during connection issues. This update includes new cases for group cipher mismatch, invalid PMKID, and TLS handshake failures, among others.
Added the EastIdahoMesh preset to the MQTT bridge implementation, increasing the total number of built-in presets. Updated the CLI to support listing available MQTT presets with pagination, improving user experience when configuring MQTT connections. Adjusted related documentation to reflect these changes.
Reintroduced the 'origin' field in the buildPacketMessage function to its original position within the JSON object. This adjustment ensures consistency in the message format and aligns with previous structural changes made to enhance clarity.
Updated the buildPacketMessage function to improve the structure of the JSON object being built. The 'origin_id' field has been moved to a later position, and the 'hash' field has been added to enhance the packet's metadata. This change aims to streamline the message format for better clarity and consistency.