Skip to content

WIP: AP_UAVCAN_DNA: add CANH health logging message #20586

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hendjoshsr71
Copy link
Member

@hendjoshsr71 hendjoshsr71 commented Apr 20, 2022

@Lokesh-Carbonix
Untested!!!
WIP demo to add a CANH healthy message to log NodeStatus info. and gather when a node disconnects

Co-authored-by: Lokesh-Carbonix [email protected]

@hendjoshsr71 hendjoshsr71 marked this pull request as draft April 20, 2022 05:34
@ghost
Copy link

ghost commented Apr 20, 2022

It will be great to add further Error parameters of a CAN Periph.

further to this idea is to also log CAN BUS status.
Parameters: Healthy, packet per sec, corrupted packet counter, and so on.

@tridge tridge marked this pull request as ready for review June 7, 2022 06:48
if we haven't logged this node then log it now
*/
if (!logged_CANH.get(node_id) && AP::logger().logging_started()) {
logged_CANH.set(node_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplest way to make it handle a single dropped pkt without logging an error is to only log the error if the bit is already set in logged_CANH when the failure happens.
also, logged_CANH needs to be unset when we do get a good reply
that way we'll log unhealthy when 2 pkts are no replied to in a row, but mark healthy when one reply is received

// @Description: CAN Health Status
// @Field: TimeUS: Time since system startup
// @Field: NodeId: Node ID
// @Field: Healthy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need description of @field Healthy

@tridge tridge force-pushed the pr/add_CANH_log_field branch from 70aa878 to f1952d3 Compare June 7, 2022 07:06
@tridge
Copy link
Contributor

tridge commented Jun 7, 2022

rebased and fixed CI error

@tridge
Copy link
Contributor

tridge commented Jun 7, 2022

Parameters: Healthy, packet per sec, corrupted packet counter, and so on.

we do have some of that in @sys filesystem at the moment, but I agree on adding logging

@tridge tridge force-pushed the pr/add_CANH_log_field branch 2 times, most recently from 548a261 to ca4ebc8 Compare June 7, 2022 23:26
@tridge tridge force-pushed the pr/add_CANH_log_field branch from ca4ebc8 to 759ed2c Compare June 23, 2022 05:57
@tridge
Copy link
Contributor

tridge commented Jun 23, 2022

@hendjoshsr71 re-worked this with @Lokesh-Carbonix to add an option to log all NodeStatus pkts. When diagnosing issues I think this is the most useful option

@tridge tridge force-pushed the pr/add_CANH_log_field branch from 759ed2c to 57632fb Compare June 23, 2022 11:09
@tridge tridge force-pushed the pr/add_CANH_log_field branch from 57632fb to 13ea23a Compare June 24, 2022 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants