Skip to content

Conversation

moshernoah
Copy link
Collaborator

Fixes #319

What was changed?

The Data Collection screen has been modified to always be listening to both the serial input device as well as the RFID reader, each on their own thread, while leaving the main thread open for user input. Related files and methods were also updated to ensure thread safety throughout the program.

Why was it changed?

This was changed for several reasons. First, the client would like to be able to scan multiple animals without having to do extra steps while on the data collection screen. In addition, it ensures threads are only running for the things they need to be and, with the addition of the extra thread safe methods, keeps the program in a much more overall stable state with (hopefully) less crashes.

How was it changed?

Data_collection has been changed to have two always running continuous threads- one for the RFID device and one for the serial device. These threads interact with the main program in safe ways, ensuring they are not accessing the same pieces of information at the same time. In addition, other files such as the experiment database, flash overlay, and serial device controller have been changed to support the new thread safe methods of access.

@moshernoah moshernoah requested a review from NNewbauer May 23, 2025 16:36
@kungfuchicken
Copy link
Contributor

@moshernoah tests are not passing. are you still working on this?

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.

Double rfid scan crashes app

2 participants