-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: mttr-rebase-3.6.7
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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]; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
This will let us associate a battery serial number with each flight in the ArduPilot log