mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-02 22:40:27 +08:00
Simulated sensors: Publish valid data initially
This commit is contained in:
1 parent
30d0dab8e6
commit
ddd1b82240
2 files changed
+3
-3
No files matched your search
@@ -493,7 +493,7 @@ ACCELSIM::init()
|
||||
_accel_class_instance = register_class_devname(ACCEL_BASE_DEVICE_PATH);
|
||||
|
||||
/* advertise sensor topic, measure manually to initialize valid report */
|
||||
struct accel_report arp;
|
||||
struct accel_report arp = {};
|
||||
_accel_reports->get(&arp);
|
||||
|
||||
/* measurement will have generated a report, publish */
|
||||
|
||||
@@ -466,7 +466,7 @@ GYROSIM::init()
|
||||
measure();
|
||||
|
||||
/* advertise sensor topic, measure manually to initialize valid report */
|
||||
struct accel_report arp;
|
||||
struct accel_report arp = {};
|
||||
_accel_reports->get(&arp);
|
||||
|
||||
/* measurement will have generated a report, publish */
|
||||
@@ -482,7 +482,7 @@ GYROSIM::init()
|
||||
|
||||
|
||||
/* advertise sensor topic, measure manually to initialize valid report */
|
||||
struct gyro_report grp;
|
||||
struct gyro_report grp = {};
|
||||
_gyro_reports->get(&grp);
|
||||
|
||||
_gyro->_gyro_topic = orb_advertise_multi(ORB_ID(sensor_gyro), &grp,
|
||||
|
||||
Reference in new issue
Block a user