drivers: no longer any need to advertise immediately (baro, mag, rangefinder)

This commit is contained in:
Daniel Agar 2021-01-30 22:18:55 -05:00 committed by Lorenz Meier
parent f80a422f9c
commit b30bd7f589
3 changed files with 0 additions and 6 deletions

View File

@ -38,8 +38,6 @@
PX4Barometer::PX4Barometer(uint32_t device_id)
{
_sensor_baro_pub.advertise();
_sensor_baro_pub.get().device_id = device_id;
}

View File

@ -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()

View File

@ -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