forked from Archive/PX4-Autopilot
drivers: no longer any need to advertise immediately (baro, mag, rangefinder)
This commit is contained in:
parent
f80a422f9c
commit
b30bd7f589
|
@ -38,8 +38,6 @@
|
|||
|
||||
PX4Barometer::PX4Barometer(uint32_t device_id)
|
||||
{
|
||||
_sensor_baro_pub.advertise();
|
||||
|
||||
_sensor_baro_pub.get().device_id = device_id;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,6 @@ PX4Magnetometer::PX4Magnetometer(uint32_t device_id, enum Rotation rotation) :
|
|||
_device_id{device_id},
|
||||
_rotation{rotation}
|
||||
{
|
||||
// advertise immediately to keep instance numbering in sync
|
||||
_sensor_pub.advertise();
|
||||
}
|
||||
|
||||
PX4Magnetometer::~PX4Magnetometer()
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
|
||||
PX4Rangefinder::PX4Rangefinder(const uint32_t device_id, const uint8_t device_orientation)
|
||||
{
|
||||
_distance_sensor_pub.advertise();
|
||||
|
||||
set_device_id(device_id);
|
||||
set_orientation(device_orientation);
|
||||
set_rangefinder_type(distance_sensor_s::MAV_DISTANCE_SENSOR_LASER); // Default to type LASER
|
||||
|
|
Loading…
Reference in New Issue