oss-slu / Mouser

GNU General Public License v3.0
1 stars 7 forks source link

Fixing sound error and errors in map rfid #191

Closed aobermiller closed 7 months ago

aobermiller commented 7 months ago

Fixes #185 Fixes #186

What was changed?

Anywhere that calls AudioManager.play() had the file path of the audio file being played changed. Experiment database now has a function to changed the RFID number of an animal.

Fixed additional errors in map_rfid that were caused when removing and adding animals.

Why was it changed?

Audio was not working anywhere in the program.

There is an error when removing then adding an RFID in the map_rfid function

How was it changed?

Everywhere in the program that calls AudioManager.play() now plays from the directory "/shared/sounds/" instead of "/sounds" (see lines 130 & 220 of data_collection_ui.py and lines 152, 162, 237, and 487 of map_rfid.py

Added a new function to ExperimentDatabase which takes an animal_id and rfid number and changes the rfid number of the animal in the database to match the passed rfid number.

Changed get_next_animal id to properly find the lowest unused animal id.

Added three new functions to experiment_database (See implementation here: https://github.com/oss-slu/Mouser/blob/6e8a79116ce7bfc674c8e33cb641b8638f2052ee/databases/experiment_database.py#L193-L234).

loganwyas commented 7 months ago

@aobermiller What's the progress on this?

aobermiller commented 7 months ago

@loganwyas Issue is ready for merge.