Skip to content
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

queryPump() doesn't work after pump has received a command #31

Open
dpk9 opened this issue Sep 3, 2024 · 1 comment
Open

queryPump() doesn't work after pump has received a command #31

dpk9 opened this issue Sep 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dpk9
Copy link
Collaborator

dpk9 commented Sep 3, 2024

After initializing pump, queryPump() returns [255, 47, 48, 96, 3, 13, 10]

After using the pump even one time, queryPump() returns None regardless of if the pump is currently executing or is still.

@dpk9 dpk9 self-assigned this Sep 3, 2024
dpk9 added a commit that referenced this issue Sep 3, 2024
todo: add this to WASH_GUI code.

Threaded the 4 Adjustments buttons, like Dispense

Identified that issues #31 and #32 exist
@dpk9 dpk9 added the bug Something isn't working label Sep 3, 2024
@dpk9
Copy link
Collaborator Author

dpk9 commented Sep 6, 2024

Once a threaded function runs, the serial read port seems to be blocked from being read outside that thread (both the main thread or new threads). Examples:

  • queryPump() works when first initialized.
  • queryPump() works after running the non-threaded functions fillPump() or emptyPump().
  • The first time a threaded function dispense() is called, the calls to queryPump() inside that thread still work.
  • During dispense(), separate user-initiated queryPump() calls do not work.
  • After the first time dispense() is called, queryPump() and any other functions that try to read serial data ever works again.

Look into "mutex"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant