diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-07 18:19:47 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-11 11:03:56 +0100 |
commit | 1bee73af2237d72a64adbf0a4bedd8b20581b4bd (patch) | |
tree | 1df06708f70aa7ae675ab00805ea066947d33ab1 /src/modules | |
parent | 172dbf37070e2dccadc8779d6e0926d3f8d60706 (diff) | |
download | px4-firmware-1bee73af2237d72a64adbf0a4bedd8b20581b4bd.tar.gz px4-firmware-1bee73af2237d72a64adbf0a4bedd8b20581b4bd.tar.bz2 px4-firmware-1bee73af2237d72a64adbf0a4bedd8b20581b4bd.zip |
Latency measurements: Estimate latency based on sensor timestamp through full system
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/fw_att_control/fw_att_control_main.cpp | 2 | ||||
-rw-r--r-- | src/modules/uORB/topics/actuator_controls.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp index d2e993ba9..6f225bb48 100644 --- a/src/modules/fw_att_control/fw_att_control_main.cpp +++ b/src/modules/fw_att_control/fw_att_control_main.cpp @@ -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) { diff --git a/src/modules/uORB/topics/actuator_controls.h b/src/modules/uORB/topics/actuator_controls.h index 4d1f9a638..668f8f164 100644 --- a/src/modules/uORB/topics/actuator_controls.h +++ b/src/modules/uORB/topics/actuator_controls.h @@ -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]; }; |