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

[Telemetry] - Implement python-can in tpu_telemetry to fetch and handle CAN errors. #106

Open
jr1221 opened this issue Feb 23, 2024 · 2 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@jr1221
Copy link
Contributor

jr1221 commented Feb 23, 2024

Description

Right now CAN error frames are ignored by Calypso. Knowing these occur and what they are may help debugging, especially if the bus sruvives in listen-only mode.

Acceptance Criteria

  • Uses just the library socketcan
  • Listens for can errors and sends them over mqtt (w/o protobuf)
  • Limits amount of errors collected to 10 at one time

Proposed Solution

Spec.
Add a can_errors.py in poll_data which is stateful class instantiated by main.py (i.e. listens for can messages constantly). It will form a listener using the environment variables inherited (probabaly created here). Upon recieving an error frame (see first link on how to check that), the program will store that error frame in a sort of que. This que should be limited in length to a reasonable amount (i.e. 10 frames).

Main.py will query fetch_data_no_compress as part of its normal loop and it will return [(topic, payload)] where payload is the error frame which will then be published as is, and topic is listed in the first link. Make sure to skip protobuf compression, this will not be like the other poll_data files and that is OK.

@jr1221 jr1221 added the feature New feature or request label Feb 23, 2024
@jr1221 jr1221 added this to the Competition milestone Feb 23, 2024
@jr1221
Copy link
Contributor Author

jr1221 commented Mar 4, 2024

@jr1221
Copy link
Contributor Author

jr1221 commented Apr 23, 2024

In progress added (but not working) in #150 . Please branch from that if you want/have time to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants