Skip to content
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

Reduce Mutexed Global Variables for cold paths of brake state #249

Open
jr1221 opened this issue Dec 29, 2024 · 0 comments
Open

Reduce Mutexed Global Variables for cold paths of brake state #249

jr1221 opened this issue Dec 29, 2024 · 0 comments

Comments

@jr1221
Copy link
Contributor

jr1221 commented Dec 29, 2024

Description

Less commonly checked variables, like brake state, aren't worth a whole API to acquire a mutex, set a brake state, and then release every 10ms.

Acceptance Criteria

Use a read_brake_state command.

Proposed Solution

To make this better, just get the brake state via the PDU API. Since get is infrequent this performance hit of i2c will be commutatively less than calling mutexes in the brake loop.

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

No branches or pull requests

1 participant