Although #187 had users input a device-specific amixer_card_num as a parameter, that card number can change when the computer is restarted. Hence, this PR has the code programmatically determine it instead.
Testing procedure
[x] Pull this code and re-build.
[x] Restart the computer with the USB mic plugged in.
[x] Run setfacl -m u:ada:rw /dev/snd/*, then wait ~5s.
[x] Start the code, verify it reads the USB mic (e.g., by ensuring e-stop clicks are registered).
[x] Verify unplugs are registered.
[x] Restart the computer with the USB mic unplugged.
[x] Plug in the USB mic.
[x] Run setfacl -m u:ada:rw /dev/snd/*, then wait ~5s.
[x] Start the code, verify it reads the USB mic (e.g., by ensuring e-stop clicks are registered).
[x] Verify unplugs are registered.
Before opening a pull request
[x] Format your code using black formatterpython3 -m black .
[x] Run your code through pylint and address all warnings/errors. The only warnings that are acceptable to not address is TODOs that should be addressed in a future PR. From the top-level ada_feeding directory, run: pylint --recursive=y --rcfile=.pylintrc ..
Description
Although #187 had users input a device-specific
amixer_card_num
as a parameter, that card number can change when the computer is restarted. Hence, this PR has the code programmatically determine it instead.Testing procedure
setfacl -m u:ada:rw /dev/snd/*
, then wait ~5s.setfacl -m u:ada:rw /dev/snd/*
, then wait ~5s.Before opening a pull request
python3 -m black .
ada_feeding
directory, run:pylint --recursive=y --rcfile=.pylintrc .
.Before Merging
Squash & Merge