Refactor poll scheduler legacy code vs. Device code #8074
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 is part of a series to get problems with joining and keeping devices working fixed.
Basically we have multiple sub systems fighting each other. Which often works but puts stress on the queues. This PR puts the DeviceTick scheduler in charge to also drive the legacy PollManager so that they don't block each other randomly.
The command to "poll a device" shouldn't come from random places in the code, but from one schedeuler — the DeviceTick.
One improvement on the DeviceTick itself is that it now not just queries the next device at a fixed interval but also actually waits until query is done or signaled that the device can't be queried right now. This speeds up processing and also prevents filling the queues.
Further the legacy
delayedFastEnddeviceProbe()
function for joining sensors is simplified to not do ZDP querying of Active Endpoints, Node and Simple Descriptors, manufacturer name and modelid. This is already done by Device code.One drawback of this PR is that polling lights after group commands is more delayed for now, this will be speed up later on again. For lights which support reporting this isn't a problem.