Latency measurements: Estimate latency based on sensor timestamp through full system

This commit is contained in:
Lorenz Meier
2015-01-07 18:19:47 +01:00
parent 172dbf3707
commit 1bee73af22
3 changed files with 8 additions and 2 deletions
@@ -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];
};