Skip to content

Commit 38a4439

Browse files
YaraShahinbmagyar
authored andcommitted
Update battery_state_broadcaster/src/battery_state_broadcaster.cpp
Co-authored-by: Bence Magyar <[email protected]>
1 parent 4779a82 commit 38a4439

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

battery_state_broadcaster/src/battery_state_broadcaster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ controller_interface::return_type BatteryStateBroadcaster::update(
367367
auto opt = state_interfaces_[interface_cnt].get_optional<bool>();
368368
if (opt.has_value())
369369
{
370-
raw_battery_states_msg.battery_states[i].present = static_cast<bool>(*opt);
370+
raw_battery_states_msg.battery_states[i].present = opt->value();
371371
}
372372
else
373373
{

0 commit comments

Comments
 (0)