Differentiate between publication and signal receive timestamp, correctly set the rc_lost flag in the frame. Ready for prime-time testing.

This commit is contained in:
Lorenz Meier
2014-01-26 14:52:46 +01:00
parent 731ab465b3
commit 9cdbbab855
6 changed files with 59 additions and 15 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ l_input_rc(const struct listener *l)
for (unsigned i = 0; (i * port_width) < (rc_raw.channel_count + port_width); i++) {
/* Channels are sent in MAVLink main loop at a fixed interval */
mavlink_msg_rc_channels_raw_send(chan,
rc_raw.timestamp / 1000,
rc_raw.timestamp_publication / 1000,
i,
(rc_raw.channel_count > (i * port_width) + 0) ? rc_raw.values[(i * port_width) + 0] : UINT16_MAX,
(rc_raw.channel_count > (i * port_width) + 1) ? rc_raw.values[(i * port_width) + 1] : UINT16_MAX,