From e43b1dd2eb1d858d7716e4ebcc9be577d43fb3fe Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 28 Nov 2022 11:21:46 +1100 Subject: [PATCH] SITL: tidy simulated proximity sensor constructors --- libraries/SITL/SIM_PS_LightWare.h | 2 +- libraries/SITL/SIM_PS_LightWare_SF45B.h | 4 ++-- libraries/SITL/SIM_PS_RPLidarA2.h | 2 ++ libraries/SITL/SIM_PS_TeraRangerTower.h | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libraries/SITL/SIM_PS_LightWare.h b/libraries/SITL/SIM_PS_LightWare.h index bd63efc05d..4964461b55 100644 --- a/libraries/SITL/SIM_PS_LightWare.h +++ b/libraries/SITL/SIM_PS_LightWare.h @@ -34,7 +34,7 @@ namespace SITL { class PS_LightWare : public SerialProximitySensor { public: - PS_LightWare() { } + using SerialProximitySensor::SerialProximitySensor; private: diff --git a/libraries/SITL/SIM_PS_LightWare_SF45B.h b/libraries/SITL/SIM_PS_LightWare_SF45B.h index 68ec7961e3..cee06d4ea6 100644 --- a/libraries/SITL/SIM_PS_LightWare_SF45B.h +++ b/libraries/SITL/SIM_PS_LightWare_SF45B.h @@ -57,14 +57,14 @@ namespace SITL { class PS_LightWare_SF45B : public PS_LightWare { public: + using PS_LightWare::PS_LightWare; + uint32_t packet_for_location(const Location &location, uint8_t *data, uint8_t buflen) override; void update(const Location &location) override; - PS_LightWare_SF45B() : PS_LightWare() { } - private: template diff --git a/libraries/SITL/SIM_PS_RPLidarA2.h b/libraries/SITL/SIM_PS_RPLidarA2.h index 558a33590a..677ca4ab69 100644 --- a/libraries/SITL/SIM_PS_RPLidarA2.h +++ b/libraries/SITL/SIM_PS_RPLidarA2.h @@ -58,6 +58,8 @@ namespace SITL { class PS_RPLidarA2 : public SerialProximitySensor { public: + using SerialProximitySensor::SerialProximitySensor; + uint32_t packet_for_location(const Location &location, uint8_t *data, uint8_t buflen) override; diff --git a/libraries/SITL/SIM_PS_TeraRangerTower.h b/libraries/SITL/SIM_PS_TeraRangerTower.h index 8d4dc7c9b5..f17f491bce 100644 --- a/libraries/SITL/SIM_PS_TeraRangerTower.h +++ b/libraries/SITL/SIM_PS_TeraRangerTower.h @@ -56,6 +56,8 @@ namespace SITL { class PS_TeraRangerTower : public SerialProximitySensor { public: + using SerialProximitySensor::SerialProximitySensor; + uint32_t packet_for_location(const Location &location, uint8_t *data, uint8_t buflen) override;