diff --git a/libraries/AP_Proximity/AP_Proximity_RPLidarA2.cpp b/libraries/AP_Proximity/AP_Proximity_RPLidarA2.cpp index 19e4724327..c773109632 100644 --- a/libraries/AP_Proximity/AP_Proximity_RPLidarA2.cpp +++ b/libraries/AP_Proximity/AP_Proximity_RPLidarA2.cpp @@ -106,6 +106,8 @@ float AP_Proximity_RPLidarA2::distance_max() const switch (model) { case Model::UNKNOWN: return 0.0f; + case Model::A1: + return 8.0f; case Model::A2: return 16.0f; } @@ -118,6 +120,8 @@ float AP_Proximity_RPLidarA2::distance_min() const switch (model) { case Model::UNKNOWN: return 0.0f; + case Model::A1: + return 0.2f; case Model::A2: return 0.2f; } @@ -316,6 +320,9 @@ void AP_Proximity_RPLidarA2::parse_response_device_info() { Debug(1, "Received DEVICE_INFO"); switch (_payload.device_info.model) { + case 0x18: + model = Model::A1; + break; case 0x28: model = Model::A2; break; diff --git a/libraries/AP_Proximity/AP_Proximity_RPLidarA2.h b/libraries/AP_Proximity/AP_Proximity_RPLidarA2.h index 051e0b75b3..2b5bfcfc9e 100644 --- a/libraries/AP_Proximity/AP_Proximity_RPLidarA2.h +++ b/libraries/AP_Proximity/AP_Proximity_RPLidarA2.h @@ -136,6 +136,7 @@ private: enum class Model { UNKNOWN, + A1, A2, } model = Model::UNKNOWN;