gps add device_id

This commit is contained in:
Daniel Agar
2021-04-08 08:27:07 +02:00
committed by Beat Küng
parent 1f4960d480
commit 39c96a8884
10 changed files with 104 additions and 6 deletions
+9
View File
@@ -46,6 +46,7 @@
#include <px4_platform_common/log.h>
#include <drivers/drv_pwm_output.h> // to get PWM flags
#include <lib/drivers/device/Device.hpp>
using namespace math;
using namespace matrix;
@@ -364,6 +365,14 @@ void Sih::send_gps()
gps_no_fix();
}
// device id
device::Device::DeviceId device_id;
device_id.devid_s.bus_type = device::Device::DeviceBusType::DeviceBusType_SIMULATION;
device_id.devid_s.bus = 0;
device_id.devid_s.address = 0;
device_id.devid_s.devtype = DRV_GPS_DEVTYPE_SIM;
_sensor_gps.device_id = device_id.devid;
_sensor_gps_pub.publish(_sensor_gps);
}