Skip to content

Commit d7ca3ee

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 1fff656 commit d7ca3ee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

battery_state_broadcaster/doc/userdoc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ The broadcaster publishes two topics:
5050
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
5151
| ``design_capacity`` | Sum across all batteries | From battery's ``design_capacity`` parameter if provided, otherwise nan. |
5252
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
53-
| ``percentage`` | Mean across batteries reporting/calculating percentage | From battery's ``battery_percentage`` interface if enabled, otherwise calculated from battery's ``min_voltage`` and ``max_voltage`` parameters. |
53+
| ``percentage`` | Mean across batteries reporting/calculating percentage | From battery's ``battery_percentage`` interface if enabled, otherwise calculated from battery's ``minimum_voltage`` and ``maximum_voltage`` parameters. |
5454
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
5555
| ``power_supply_status`` | Highest reported enum value | From battery's ``battery_power_supply_status`` interface if enabled, otherwise 0 (unknown). |
5656
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
5757
| ``power_supply_health`` | Highest reported enum value | From battery's ``battery_power_supply_health`` interface if enabled, otherwise 0 (unknown). |
5858
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
5959
| ``power_supply_technology`` | Reported as-is if same across all batteries, otherwise set to *Unknown* | From battery's ``power_supply_technology`` parameter if provided, otherwise 0 (unknown). |
6060
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
61-
| ``present`` | True | From battery's ``battery_present`` interface if enabled, otherwise true if battery's voltage values is valid. |
61+
| ``present`` | True | From battery's ``battery_present`` interface if enabled, otherwise true if the battery voltage value is valid (not NaN and not 0.0). |
6262
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
6363
| ``cell_voltage`` | Empty | Empty |
6464
+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+

battery_state_broadcaster/src/battery_state_broadcaster_parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ battery_state_broadcaster:
3232
type: bool,
3333
default_value: false,
3434
read_only: true,
35-
description: "Whether to read charge level [%] (0.0 to 100.0) from this battery's state interface. If unmeasured, linear percentage is calculated using min and max voltage parameters (if provided), otherwise NaN."
35+
description: "Whether to read charge level [%] (0.0 to 100.0) from this battery's state interface. If unmeasured, linear percentage is calculated using the minimum_voltage and maximum_voltage parameters (if provided), otherwise NaN."
3636
}
3737
battery_power_supply_status: {
3838
type: bool,

0 commit comments

Comments
 (0)