-
Notifications
You must be signed in to change notification settings - Fork 1
Added Can Monitoring #4
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just had one question about LEC and DLEC where I'm probably missing some context. EDIT: Sorry, overlooked what you wrote in the PR description.
|
I'm not entirely sure this is the best way to read the DLEC/LEC stats but I haven't found a better way. I'm open to suggestions though. The DLEC/LEC Registers are reset when there was a successful transmission without error (See page 1991 of the datasheet) so we have to save them between getSensorData calls |
|
One thing i don't how to fix: Most of the PSR/CSR Register Values are reset on read. Idk how the chip deals with me getting the whole register but then only accessing certain bits(when reading DLEC/LEC). Are they then reset? What should my code do in that case? It could be that we are reading so quickly that we never reach high error values because they are reset before even getting high. But then again I don't know of a better way to do it Do you have an Idea how we should tackle this? |
…e_liquids into feature/can_monitoring
a345760 to
37b1fbe
Compare
This PR works in conjunction with the PRs in STRHAL, LLServer and can_houbolt.
It adds monitoring of the can chip states of each ECU. The data is sent via can to the llserver which logs it in Influx.
Notable here is that the LEC and DLEC counters are measured in between getSensorState calls and only values != 0b111 are saved to not overwrite values.