Skip to content

Make ebb3_serial more robust #61

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
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

berleant
Copy link
Contributor

@berleant berleant commented Mar 10, 2025

In general the diff looks more dramatic than the changes really are, due to some refactoring I did early on to avoid making the same changes multiple times in different places. The vast majority of the time, no changes to behavior should be noted (other than some error messages being slightly modified).

Summary of changes:

  • Retry sending certain commands/queries up to 3 times. Retries are only attempted if re-sending the command will not cause motor position errors (i.e., the EBB sent an error message indicating that the command/query was not understood OR plotink timed out waiting for a response from the EBB AND the command/query is idempotent).
  • Add a counter for total number of retries in a plot. Not currently reported to the user anywhere.
  • Previously the code assumed that serial.Serial.readline always returned a full line. This turns out to have been a faulty assumption, so I fixed that.
  • Made the code more robust to getting out-of-sync with the EBB, by reading as much output from the EBB as is available (up to a maximum number of polls).

@berleant berleant force-pushed the ab-handover-rebase branch from 3254add to d33bcfe Compare March 11, 2025 17:28
@berleant berleant marked this pull request as ready for review March 20, 2025 14:16
@berleant
Copy link
Contributor Author

@oskay ready to merge

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