mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 17:10:34 +08:00
commander preflight check sensors via uORB instead of IOCTL
- remove all platform defines
This commit is contained in:
committed by
Lorenz Meier
parent
f72e9e4385
commit
c7e572d2c2
@@ -837,6 +837,8 @@ ACCELSIM::_measure()
|
||||
|
||||
accel_report.timestamp = hrt_absolute_time();
|
||||
|
||||
accel_report.device_id = 1310728;
|
||||
|
||||
// use the temperature from the last mag reading
|
||||
accel_report.temperature = _last_temperature;
|
||||
|
||||
@@ -919,6 +921,7 @@ ACCELSIM::mag_measure()
|
||||
|
||||
|
||||
mag_report.timestamp = hrt_absolute_time();
|
||||
mag_report.device_id = 196616;
|
||||
mag_report.is_external = false;
|
||||
|
||||
mag_report.x_raw = (int16_t)(raw_mag_report.x / _mag_range_scale);
|
||||
|
||||
@@ -968,7 +968,7 @@ GYROSIM::_measure()
|
||||
arb.z_integral = aval_integrated(2);
|
||||
|
||||
/* fake device ID */
|
||||
arb.device_id = 6789478;
|
||||
arb.device_id = 1376264;
|
||||
|
||||
grb.x_raw = (int16_t)(mpu_report.gyro_x / _gyro_range_scale);
|
||||
grb.y_raw = (int16_t)(mpu_report.gyro_y / _gyro_range_scale);
|
||||
@@ -991,12 +991,11 @@ GYROSIM::_measure()
|
||||
grb.z_integral = gval_integrated(2);
|
||||
|
||||
/* fake device ID */
|
||||
grb.device_id = 3467548;
|
||||
grb.device_id = 2293768;
|
||||
|
||||
_accel_reports->force(&arb);
|
||||
_gyro_reports->force(&grb);
|
||||
|
||||
|
||||
if (accel_notify) {
|
||||
if (!(_pub_blocked)) {
|
||||
/* publish it */
|
||||
|
||||
Reference in New Issue
Block a user