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

Sign up
Appearance settings

Fixing issue #845: inconsistent behavior in chained --set when one of them fails #873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
juergenRe wants to merge 1 commit into meshtastic:master
base: master
Choose a base branch
Loading
from juergenRe:karadoc/fix_845

Conversation

@juergenRe
Copy link

@juergenRe juergenRe commented Dec 3, 2025

This PR will do a settings change to the radio only when all of the chained --set commands are valid (parameter exists and value is accepted). If one of them fails, the whole command will be rejected and no changes are propagated to the radio.

During testing 2 additional problems have been fixed:

  1. The receive thread runs "open loop" if there is nothing to receive. This will heavily block the main thread. I added a time.sleep(0.001) which will not delay the thread but can initiate a switch to the main thread if necessary. Reactivity of the programm was clearly increased due to this change. Remark: Today, one would use async def instead of a thread.

  2. The local node will be instantiated when the meshinterface is created. However, the noproto attribute will not be passed to it. This blocks the execution in the unit tests for some cases. I added the initialization of the noproto during the creation of the local node field. Note: this implementation seems not properly thought. I don't see a need that the node knows how to transfer data. Shouldn't we rethink this?

Unit tests pass to 100%, as well as intergration tests. Smoke test not done, because 50% do not pass anyway (PR pending)

thatSFguy reacted with thumbs up emoji
...ng case.
- add time.sleep(0.001) in receive thread for idle receptions. This will balance processor time between main thread and receive thread
- local node will get the noproto property directly from meshinterface to have consistent settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /