Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Filter --reply based on specified channel index#883

Open
thatSFguy wants to merge 1 commit intomeshtastic:mastermeshtastic/python:masterfrom
thatSFguy:patch-3thatSFguy/python:patch-3Copy head branch name to clipboard
Open

Filter --reply based on specified channel index#883
thatSFguy wants to merge 1 commit intomeshtastic:mastermeshtastic/python:masterfrom
thatSFguy:patch-3thatSFguy/python:patch-3Copy head branch name to clipboard

Conversation

@thatSFguy
Copy link

Fixes an issue where automatic replies generated by the --reply flag were incorrectly routed and unfiltered.

Changes

  1. Channel Routing: Responses are now explicitly sent back on the same channel index the message was received on, rather than defaulting to the primary channel (0).

  2. Channel Filtering: The --reply action now respects the --ch-index flag. It will only trigger a response if the incoming message matches the user-specified channel.

Behavior Comparison

Command: meshtastic --ch-index 1 --reply

Scenario Previous Behavior New Behavior
Msg received on Ch 0 Sent reply on Ch 0 Ignored (No match)
Msg received on Ch 1 Sent reply on Ch 0 Sent reply on Ch 1
Msg received on Ch 2 Sent reply on Ch 0 Ignored (No match)

Technical Implementation

The onReceive handler now casts args.ch_index to an integer and performs a comparison against the channel field in the incoming packet before calling interface.sendText().

Ensures that automatic replies are sent back on the same channel index the message was received on. Previously, all replies defaulted to the primary channel (0), even if the incoming message arrived on a secondary channel. Additionally it ensures incoming messages match the specified channel index.

E.g:  meshtastic --ch-index 1 --reply .

Modified the `onReceive` handler to extract the `channel` index from received packets. This ensures `interface.sendText` targets the originating channel rather than always defaulting to the primary channel. Added a filter to ensure that only the specified channel index is being replied to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.