Skip to content

Conversation

@juergenRe
Copy link

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)

…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant