mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:03:34 +08:00
Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_baro.h>
|
||||
|
||||
#include <board_config.h>
|
||||
@@ -130,6 +131,10 @@ int DfBmp280Wrapper::start()
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(__DF_BBBLUE)
|
||||
PX4_INFO("BMP280 started");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -151,11 +156,12 @@ int DfBmp280Wrapper::_publish(struct baro_sensor_data &data)
|
||||
perf_begin(_baro_sample_perf);
|
||||
|
||||
baro_report baro_report = {};
|
||||
baro_report.timestamp = hrt_absolute_time();
|
||||
baro_report.timestamp = hrt_absolute_time();
|
||||
baro_report.error_count = data.error_counter;
|
||||
|
||||
baro_report.pressure = data.pressure_pa / 100.0f; // to mbar
|
||||
baro_report.pressure = data.pressure_pa / 100.0f; // to mbar
|
||||
baro_report.temperature = data.temperature_c;
|
||||
|
||||
|
||||
// TODO: when is this ever blocked?
|
||||
if (!(m_pub_blocked)) {
|
||||
|
||||
|
||||
@@ -618,6 +618,8 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data)
|
||||
|
||||
accel_report.timestamp = gyro_report.timestamp = hrt_absolute_time();
|
||||
|
||||
accel_report.error_count = gyro_report.error_count = mag_report.error_count = data.error_counter;
|
||||
|
||||
// ACCEL
|
||||
|
||||
float xraw_f = data.accel_m_s2_x;
|
||||
|
||||
Reference in New Issue
Block a user