APM:Libraries
|
Go to the source code of this file.
Functions | |
int | srxl_decode (uint64_t timestamp_us, uint8_t byte, uint8_t *num_values, uint16_t *values, uint16_t max_values, bool *failsafe_state) |
int srxl_decode | ( | uint64_t | timestamp_us, |
uint8_t | byte, | ||
uint8_t * | num_values, | ||
uint16_t * | values, | ||
uint16_t | max_values, | ||
bool * | failsafe_state | ||
) |
Decode SRXL frames
Structure of all SRXL frames Byte[0]: Header 0xA<VARIANT> –> Variant specific header. Variant is encoded in bits 3-0 of header byte. Byte[1] - Byte[N-2]: SRXL variant specific payload Byte[N-1] - Byte[N]: CRC16 over payload and header
[in] | timestamp_us | - timestamp in microseconds |
[in] | received | byte in microseconds |
[out] | num_values | - number of RC channels extracted from srxl frame |
[out] | values | - array of RC channels with refreshed information as pulsewidth in microseconds Range: 800us - 2200us |
[in] | maximum | number of values supported by pixhawk |
[out] | failsafe_state | - true: RC-receiver is in failsafe state, false: RC-receiver is not in failsafe state |
0 | success (a decoded packet) |
1 | no packet yet (accumulating) |
2 | unknown packet |
4 | checksum error |
Definition at line 262 of file srxl.cpp.
Referenced by Linux::RCInput::add_srxl_input(), and srxl_decode().