Skip to content

Added logging of BMU battery ID#93

Open
tridge wants to merge 6 commits intomttr-rebase-3.6.7from
pr-uavcan-bat-model
Open

Added logging of BMU battery ID#93
tridge wants to merge 6 commits intomttr-rebase-3.6.7from
pr-uavcan-bat-model

Conversation

@tridge
Copy link
Contributor

@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.

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?


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