mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 16:30:34 +08:00
Latency measurements: Estimate latency based on sensor timestamp through full system
This commit is contained in:
@@ -1060,7 +1060,9 @@ FixedwingAttitudeControl::task_main()
|
||||
|
||||
/* lazily publish the setpoint only once available */
|
||||
_actuators.timestamp = hrt_absolute_time();
|
||||
_actuators.timestamp_sample = _att.timestamp;
|
||||
_actuators_airframe.timestamp = hrt_absolute_time();
|
||||
_actuators_airframe.timestamp_sample = _att.timestamp;
|
||||
|
||||
/* publish the actuator controls */
|
||||
if (_actuators_0_pub > 0) {
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
struct actuator_controls_s {
|
||||
uint64_t timestamp;
|
||||
uint64_t timestamp_sample; /**< the timestamp the data this control response is based on was sampled */
|
||||
float control[NUM_ACTUATOR_CONTROLS];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user