aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/px4fmu
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-01-26 14:52:46 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-01-26 14:52:46 +0100
commit9cdbbab855d463bffb39d8dd55888fc1e0423818 (patch)
tree73ceaaab28d0fd08ea47c02eab66c11638c86e58 /src/drivers/px4fmu
parent731ab465b3d7d40ffb5ce3ca3d14660c6fee1ae6 (diff)
downloadpx4-firmware-9cdbbab855d463bffb39d8dd55888fc1e0423818.tar.gz
px4-firmware-9cdbbab855d463bffb39d8dd55888fc1e0423818.tar.bz2
px4-firmware-9cdbbab855d463bffb39d8dd55888fc1e0423818.zip
Differentiate between publication and signal receive timestamp, correctly set the rc_lost flag in the frame. Ready for prime-time testing.
Diffstat (limited to 'src/drivers/px4fmu')
-rw-r--r--src/drivers/px4fmu/fmu.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp
index c067d363b..0fbd84924 100644
--- a/src/drivers/px4fmu/fmu.cpp
+++ b/src/drivers/px4fmu/fmu.cpp
@@ -626,7 +626,7 @@ PX4FMU::task_main()
#ifdef HRT_PPM_CHANNEL
// see if we have new PPM input data
- if (ppm_last_valid_decode != rc_in.timestamp) {
+ if (ppm_last_valid_decode != rc_in.timestamp_last_signal) {
// we have a new PPM frame. Publish it.
rc_in.channel_count = ppm_decoded_channels;
@@ -638,7 +638,15 @@ PX4FMU::task_main()
rc_in.values[i] = ppm_buffer[i];
}
- rc_in.timestamp = ppm_last_valid_decode;
+ rc_in.timestamp_publication = ppm_last_valid_decode;
+ rc_in.timestamp_last_signal = ppm_last_valid_decode;
+
+ rc_in.rc_ppm_frame_length = ppm_frame_length;
+ rc_in.rssi = RC_INPUT_RSSI_MAX;
+ rc_in.rc_failsafe = false;
+ rc_in.rc_lost = false;
+ rc_in.rc_lost_frame_count = 0;
+ rc_in.rc_total_frame_count = 0;
/* lazily advertise on first publication */
if (to_input_rc == 0) {