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

AP_DroneCAN: DNA Server: log duplicate nodes in CAND #26224

Closed
wants to merge 1 commit into from

Conversation

IamPete1
Copy link
Member

This means we get a CAND log of any duplicate nodes that turn up, this should make it much easier to track down what is going on. It still get the log even if ignore duplicates is set, its still valid to log because it better represents the peripherals connected. Logging is still only done if a log has been started, if the issue is a boot you would have to enable disarmed logging to get the original unique ID that caused the conflict.

Note that we only get 1 extra log, so if there are multiple duplicates we only get the first.

Tested by deliberately setting two static IDs to conflict. In this case the two devices were both here2's so only the UID is different, but the other fields would also be different for other devices.

image

@IamPete1
Copy link
Member Author

IamPete1 commented Feb 14, 2024

Thinking about it a bit more this will only catch the issue if both nodes show up in one boot. We may be better to log the CAN database so we can look for the conflict from a past boot too. Maybe we could log it as a @SYS file.

edit: The CAN database stores a hash not the full unique ID, so showing the logged database to show the user does not let us give the unique ID of the conflict because we only have a hash of it. So I think this PR is the best we can do, it may or may not be worth it....

@IamPete1
Copy link
Member Author

Flash cost:

Binary Name      Text [B]        Data [B]     BSS (B)      Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  --------------  -----------  -----------  ----------------------------  -------------------------
ardurover        104 (+0.0064%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0064%)                                   337460
blimp            104 (+0.0078%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0077%)                                   623056
arducopter       104 (+0.0059%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0059%)                                   193108
arduplane        104 (+0.0059%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0059%)                                   201416
ardusub          104 (+0.0067%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0066%)                                   400728
antennatracker   104 (+0.0079%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0079%)                                   645924
arducopter-heli  104 (+0.0059%)  0 (0.0000%)  0 (0.0000%)  104 (+0.0058%)                                   186940

@IamPete1
Copy link
Member Author

Conclusion of the call was that this is quite unlikely to catch a issue because both nodes must be present at while logging, so its probably not worth the cost.

@IamPete1 IamPete1 closed this Feb 20, 2024
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

Successfully merging this pull request may close these issues.

2 participants