We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4779a82 commit 38a4439Copy full SHA for 38a4439
battery_state_broadcaster/src/battery_state_broadcaster.cpp
@@ -367,7 +367,7 @@ controller_interface::return_type BatteryStateBroadcaster::update(
367
auto opt = state_interfaces_[interface_cnt].get_optional<bool>();
368
if (opt.has_value())
369
{
370
- raw_battery_states_msg.battery_states[i].present = static_cast<bool>(*opt);
+ raw_battery_states_msg.battery_states[i].present = opt->value();
371
}
372
else
373
0 commit comments