Fixing issue #845: inconsistent behavior in chained --set when one of them fails
#873
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will do a settings change to the radio only when all of the chained
--setcommands 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:
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 useasync definstead of a thread.The local node will be instantiated when the meshinterface is created. However, the
noprotoattribute will not be passed to it. This blocks the execution in the unit tests for some cases. I added the initialization of thenoprotoduring 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)