mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 01:13:38 +08:00
DistanceSensorCheck: do not raise a distance sensor failure if the SFXX_MODE is set to 2 and we are in a VTOL FX flight phase
This commit is contained in:
@@ -40,6 +40,7 @@ PX4Rangefinder::PX4Rangefinder(const uint32_t device_id, const uint8_t device_or
|
||||
set_device_id(device_id);
|
||||
set_orientation(device_orientation);
|
||||
set_rangefinder_type(distance_sensor_s::MAV_DISTANCE_SENSOR_LASER); // Default to type LASER
|
||||
set_mode(UINT8_C(0));
|
||||
}
|
||||
|
||||
PX4Rangefinder::~PX4Rangefinder()
|
||||
|
||||
@@ -60,6 +60,8 @@ public:
|
||||
|
||||
void set_orientation(const uint8_t device_orientation = distance_sensor_s::ROTATION_DOWNWARD_FACING);
|
||||
|
||||
void set_mode(const uint8_t mode) {_distance_sensor_pub.get().mode = mode; }
|
||||
|
||||
void update(const hrt_abstime ×tamp_sample, const float distance, const int8_t quality = -1);
|
||||
|
||||
int get_instance() { return _distance_sensor_pub.get_instance(); };
|
||||
|
||||
Reference in New Issue
Block a user