mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 11:21:35 +08:00
fix reading baro values from simulator
This commit is contained in:
@@ -640,7 +640,7 @@ BAROSIM::collect()
|
||||
report.error_count = perf_event_count(_comms_errors);
|
||||
|
||||
/* read the most recent measurement - read offset/size are hardcoded in the interface */
|
||||
ret = _interface->dev_read(0, (void *)&baro_report, 0);
|
||||
ret = _interface->dev_read(0, (void *)&baro_report, sizeof(baro_report));
|
||||
if (ret < 0) {
|
||||
perf_count(_comms_errors);
|
||||
perf_end(_sample_perf);
|
||||
|
||||
Reference in New Issue
Block a user