Skip to content

Added logging of BMU battery ID #93

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 6 commits into
base: mttr-rebase-3.6.7
Choose a base branch
from

Conversation

tridge
Copy link
Collaborator

@tridge tridge commented Oct 5, 2019

This will let us associate a battery serial number with each flight in the ArduPilot log

@tridge tridge requested a review from Aksellence October 5, 2019 04:26
Copy link
Contributor

@Aksellence Aksellence left a comment

Choose a reason for hiding this comment

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

Other than the few comments on the const, everything looks good.

@@ -118,6 +118,8 @@ class AP_UAVCAN {
float remaining_capacity_wh;
float full_charge_capacity_wh;
uint8_t status_flags;
uint32_t model_instance_id;
uint8_t model_name[32+1];
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have more insight into what does '32' and '1' stand for? We could define them as a const maybe?

@@ -1338,7 +1338,7 @@ uint8_t AP_UAVCAN::register_BM_bi_listener_to_id(AP_BattMonitor_Backend* new_lis
}

for (uint8_t i = 0; i < AP_UAVCAN_MAX_BI_NUMBER; i++) {
if (_bi_id[i] != id) {
if (id != -1 && _bi_id[i] != id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to define -1 as a const

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