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
+16 -2
View File
@@ -62,6 +62,11 @@
*/
#define RC_INPUT_MAX_CHANNELS 18
/**
* Maximum RSSI value
*/
#define RC_INPUT_RSSI_MAX 255
/**
* Input signal type, value is a control position from zero to 100
* percent.
@@ -83,8 +88,11 @@ enum RC_INPUT_SOURCE {
* on the board involved.
*/
struct rc_input_values {
/** decoding time */
uint64_t timestamp;
/** publication time */
uint64_t timestamp_publication;
/** last valid reception time */
uint64_t timestamp_last_signal;
/** number of channels actually being seen */
uint32_t channel_count;
@@ -120,6 +128,12 @@ struct rc_input_values {
* */
uint16_t rc_total_frame_count;
/**
* Length of a single PPM frame.
* Zero for non-PPM systems
*/
uint16_t rc_ppm_frame_length;
/** Input source */
enum RC_INPUT_SOURCE input_source;