mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 23:53:35 +08:00
sdlog2: BATT message bug fixed
This commit is contained in:
@@ -1261,6 +1261,7 @@ int sdlog2_thread_main(int argc, char *argv[])
|
||||
|
||||
/* --- BATTERY --- */
|
||||
if (fds[ifds++].revents & POLLIN) {
|
||||
orb_copy(ORB_ID(battery_status), subs.battery_sub, &buf.battery);
|
||||
log_msg.msg_type = LOG_BATT_MSG;
|
||||
log_msg.body.log_BATT.voltage = buf.battery.voltage_v;
|
||||
log_msg.body.log_BATT.current = buf.battery.current_a;
|
||||
|
||||
Reference in New Issue
Block a user