diff --git a/src/drivers/smart_battery/batmon/batmon.cpp b/src/drivers/smart_battery/batmon/batmon.cpp index ed424c1e18..a29c04aa28 100644 --- a/src/drivers/smart_battery/batmon/batmon.cpp +++ b/src/drivers/smart_battery/batmon/batmon.cpp @@ -191,7 +191,6 @@ void Batmon::RunImpl() if (ret == PX4_OK) { new_report.capacity = _batt_capacity; new_report.cycle_count = _cycle_count; - new_report.serial_number = _serial_number; new_report.max_cell_voltage_delta = _max_cell_voltage_delta; new_report.cell_count = _cell_count; new_report.state_of_health = _state_of_health; @@ -220,6 +219,12 @@ void Batmon::RunImpl() orb_publish_auto(ORB_ID(battery_status), &_batt_topic, &new_report, &instance); _last_report = new_report; + + battery_info_s battery_info{}; + battery_info.timestamp = new_report.timestamp; + battery_info.id = new_report.id; + snprintf(battery_info.serial_number, sizeof(battery_info.serial_number), "%" PRIu16, _serial_number); + orb_publish_auto(ORB_ID(battery_info), &_battery_info_topic, &battery_info, &instance); } }