Skip to content

Reset send attemp for a channel if write was successful [Control+]#127

Closed
vicocz wants to merge 3 commits intoimurvai:masterfrom
vicocz:feature/controlplus-optimize-command-writes
Closed

Reset send attemp for a channel if write was successful [Control+]#127
vicocz wants to merge 3 commits intoimurvai:masterfrom
vicocz:feature/controlplus-optimize-command-writes

Conversation

@vicocz
Copy link
Contributor

@vicocz vicocz commented Nov 2, 2024

During my work on #125 I've noticed (thx to port output command feedback) that a channel value is written 10 times (if it does not change in the meantime) due to the fact send attempts are not reset. Additionally write delay was 60ms which means that for hubs with several ports single round might take e.g. 9 ports * 60 ms. It might delay application of a channel value by circa 400 ms in some teoretical situations.

Additionally I've inverted IFs so as there are less return true lines.

Tried to optimize it:

  • decreased send wait time to 10ms
  • reset send attempts on success

Dev tested on my TechnicHub.

@vicocz vicocz changed the title Reset send attemp for channel if write was successful [Control+] Reset send attemp for a channel if write was successful [Control+] Nov 2, 2024
@vicocz vicocz marked this pull request as ready for review November 2, 2024 13:10
@vicocz vicocz marked this pull request as draft November 13, 2024 19:58
@vicocz vicocz closed this Mar 19, 2025
J0EK3R pushed a commit to J0EK3R/brickcontroller2 that referenced this pull request May 20, 2025
* Run unit tests for BrickController core project
* GH workflows use windows-2025 which contains maui 9 workloads
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