28-configurable-tag-handling #48

Merged
matthias merged 2 commits from 28-configurable-tag-handling into main 2025-11-04 18:54:55 +00:00
Owner

feat(app): Implement tag handling modes according to #28.

If the tagmode setting is 'tagremains' (the default): Play as long as the
tag is on the reader, with a 5 second timeout (i.e. playback stops when
tag is gone for more than 5 seconds).

If the tagmode setting is 'tagstartstop': Playback starts when a tag is
seen. Presenting a different tag causes the playback to stop and
playback for the new tag to start. Re-presenting the same tag used to
start with a no-tag-time of 5 seconds or more in between stops playback.
feat(app): Implement tag handling modes according to #28. If the tagmode setting is 'tagremains' (the default): Play as long as the tag is on the reader, with a 5 second timeout (i.e. playback stops when tag is gone for more than 5 seconds). If the tagmode setting is 'tagstartstop': Playback starts when a tag is seen. Presenting a different tag causes the playback to stop and playback for the new tag to start. Re-presenting the same tag used to start with a no-tag-time of 5 seconds or more in between stops playback.
matthias self-assigned this 2025-11-04 18:27:03 +00:00
matthias added 2 commits 2025-11-04 18:27:04 +00:00
Split the tag handling in PlayerApp into two parts: The low level
handling of changed/removed tags from the Nfc reader, including the
timeout processing is moved into the nested TagStateMachine class. The
main PlayerApp has two new (internal) callbacks "onNewTag" and
"onTagRemoved" which are called when a new tag is presented or a tag was
actually removed. This will hopefully make the implementation of #28
"Configurable Tag Handling" cleaner.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
feat(app): Implement tag handling modes according to #28.
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m24s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 6s
Run unit tests on host / Run-Unit-Tests (push) Successful in 9s
Run pytests / Check-Pytest (push) Successful in 11s
7d3cdbabe4
If the tagmode setting is 'tagremains' (the default): Play as long as the
tag is on the reader, with a 5 second timeout (i.e. playback stops when
tag is gone for more than 5 seconds).

If the tagmode setting is 'tagstartstop': Playback starts when a tag is
seen. Presenting a different tag causes the playback to stop and
playback for the new tag to start. Re-presenting the same tag used to
start with a no-tag-time of 5 seconds or more in between stops playback.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
matthias requested review from Members 2025-11-04 18:27:04 +00:00
stefank approved these changes 2025-11-04 18:37:44 +00:00
matthias merged commit 0820ec1fc8 into main 2025-11-04 18:54:55 +00:00
matthias deleted branch 28-configurable-tag-handling 2025-11-04 18:54:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TonBERRY/tonberry-pico#48