mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 06:36:45 +08:00
committed by
Matthias Grob
parent
11bf3cffde
commit
3e290695ef
@@ -84,7 +84,11 @@ void PX4Rangefinder::update(const hrt_abstime ×tamp_sample, const float dis
|
||||
}
|
||||
|
||||
// Update the quaternion in the sample update
|
||||
memcpy(report.q, q, sizeof(float) * q_len);
|
||||
if (q != nullptr) {
|
||||
memcpy(report.q, q, sizeof(float) * q_len);
|
||||
|
||||
}
|
||||
|
||||
|
||||
_distance_sensor_pub.update();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ public:
|
||||
void set_mode(const uint8_t mode) { _distance_sensor_pub.get().mode = mode; }
|
||||
|
||||
// update with quaterion sensor orientation with respect to the vehicle body frame
|
||||
void update(const hrt_abstime ×tamp_sample, const float distance, const int8_t quality = -1, const float *q = nullptr, uint8_t q_len = 4);
|
||||
void update(const hrt_abstime ×tamp_sample, const float distance, const int8_t quality = -1, const float *q = nullptr,
|
||||
uint8_t q_len = 4);
|
||||
|
||||
int get_instance() { return _distance_sensor_pub.get_instance(); };
|
||||
uint32_t get_device_id() { return _distance_sensor_pub.get().device_id; };
|
||||
|
||||
Reference in New Issue
Block a user