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_UAVCAN: added CAN_Dn_UC_OPTION parameter #18641

Merged
merged 1 commit into from Sep 17, 2021

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Sep 11, 2021

this allows for 2 ways of controlling conflicts in the UAVCAN DNA
database. The first is to set CAN_Dn_UC_OPTION to 1, which resets the
DNA database on the next boot, thus clearing any node conflicts.

The second is to set CAN_Dn_UC_OPTION to 2, which ignores node
conflicts in the DNA database

These options are useful for vehicles with UAVCAN smart batteries
where the node ID is fixed but the hwid changes and you want to do
battery swapping (possibly without rebooting)

@tridge tridge removed the DevCallEU label Sep 15, 2021
Copy link
Member

@bugobliterator bugobliterator left a comment

Choose a reason for hiding this comment

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

This feels bit like turning off pre-arm check, so hoping that we educate users as to implications of using this. Outside of that I am happy with the PR.

@@ -541,7 +547,7 @@ void AP_UAVCAN_DNA_Server::handleNodeInfo(uint8_t node_id, uint8_t unique_id[],
nodeInfo_resp_rcvd = true;
}
setVerificationMask(node_id);
} else {
} else if (!_ap_uavcan->check_option(AP_UAVCAN::Options::DNA_IGNORE_DUPLICATE_NODE)) {
Copy link
Member

Choose a reason for hiding this comment

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

I believe a better, safer way might be to allow replacement, not duplication. Maybe something like if a node pops up with same node id replace it, and then if a node shows up again with same node ID within X amount of time, raise alarm.

This might not be required for tightly controlled setups. But for DIY and prototypes, there should at least be some sort of disclaimer put on this, so people don't misuse this option.

this allows for 2 ways of controlling conflicts in the UAVCAN DNA
database. The first is to set CAN_Dn_UC_OPTION to 1, which resets the
DNA database, thus clearing any node conflicts.

The second is to set CAN_Dn_UC_OPTION to 2, which ignores node
conflicts in the DNA database

These options are useful for vehicles with UAVCAN smart batteries
where the node ID is fixed but the hwid changes and you want to do
battery swapping (possibly without rebooting)
@tridge tridge merged commit 63fcb80 into ArduPilot:master Sep 17, 2021
@tridge tridge added this to Pending in Plane 4.1 Oct 15, 2021
@rmackay9 rmackay9 added this to pending in Copter 4.1 Oct 15, 2021
@tridge tridge moved this from Pending to Done in Plane 4.1 Nov 8, 2021
@rmackay9 rmackay9 moved this from pending to 4.1.2-rc1 in Copter 4.1 Nov 21, 2021
@Hwurzburg Hwurzburg removed the WikiNeeded needs wiki update label Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Copter 4.1
4.1.2-rc1
Rover 4.1
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants