Skip to content

Add the watchdog timer as our first asyncio component #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nateinaction opened this issue Jan 24, 2025 · 2 comments
Open

Add the watchdog timer as our first asyncio component #108

nateinaction opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nateinaction
Copy link
Member

nateinaction commented Jan 24, 2025

Description

As a flight software engineer
I want to have an established pattern for running multiple tasks at a time
So that I can adopt the pattern for other components moving forward

The watchdog is sufficiently isolated component that it might be a good candidate for an initial and simple asyncio implementation.

Acceptance Criteria

  • watchdog_pet() is only called in one location (possibly a while loop in main.py)
  • remove additional calls to watchdog_pet() in main.py and safe_sleep()
  • watchdog_pet() is running asynchronously in the background

Technical Details

@Mikefly123 Mikefly123 added the enhancement New feature or request label Jan 26, 2025
@yudataguy
Copy link
Collaborator

Let me take a stab at this

@yudataguy yudataguy self-assigned this Feb 3, 2025
@Mikefly123
Copy link
Member

It should be relatively straight forward to implement! I think main thing to figure out will be how to reconcile having asyncio awaits in multiple difference locations in the code. We originally only had it implemented in main and it worked fine, but when we transitioned to the new adafruit_RFM radio library the implementation broke because the new radio library also has await calls that seemed to cause a race condition with main.

@SamuelGomezG SamuelGomezG self-assigned this Mar 10, 2025
yudataguy added a commit that referenced this issue Mar 24, 2025
blakejameson added a commit that referenced this issue Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants