Skip to content

Add command line arguments to start/stop the tap timer and exit - #3

Closed
hmoffatt wants to merge 3 commits into
scottmckenzie:masterfrom
hmoffatt:run_arg
Closed

hmoffatt wants to merge 3 commits into
scottmckenzie:masterfrom
hmoffatt:run_arg

Conversation

@hmoffatt

@hmoffatt hmoffatt commented Dec 4, 2018

Copy link
Copy Markdown
Contributor

No description provided.

@scottmckenzie

Copy link
Copy Markdown
Owner

Thanks @hmoffatt for this. Being able to start and stop the tap from a script is a really useful addition, and sorry it sat here for so long.

The project has changed a lot since this was opened (BTX1 support, plus a migration to uv, pytest, ruff and CI in #10), so this branch no longer merges cleanly. Rather than ask you to rebase seven-year-old code, I've re-implemented the feature on the current codebase in #11, with you credited as co-author.

It keeps your design (--run MINUTES and --stop, plus a timer_written listener event) and adds a few fixes:

  • TapTimerListener now has a default timer_written(), so existing SDK listeners don't break
  • a failed write now exits instead of hanging
  • the tap timer is disconnected before exiting
  • failures exit with status 1
  • --run only accepts 1-255 minutes

Reviews and testing on #11 are very welcome, especially if you still have a BTX1. I'll close this PR once #11 is merged.

@scottmckenzie

Copy link
Copy Markdown
Owner

Closing now that #11 is merged (bbf545d), so --run and --stop are on master. Thanks again @hmoffatt!

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.

2 participants