PX4 Firmware
PX4 Autopilot Software http://px4.io
|
RC protocol definition for Graupner HoTT transmitter. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | ReceiverFcPacketHoTT |
Macros | |
#define | SUMD_MAX_CHANNELS 32 |
#define | SUMD_HEADER_LENGTH 3 |
#define | SUMD_HEADER_ID 0xA8 |
#define | SUMD_ID_SUMH 0x00 |
#define | SUMD_ID_SUMD 0x01 |
#define | SUMD_ID_FAILSAFE 0x81 |
Functions | |
uint16_t | sumd_crc16 (uint16_t crc, uint8_t value) |
CRC16 implementation for SUMD protocol. More... | |
uint8_t | sumd_crc8 (uint8_t crc, uint8_t value) |
CRC8 implementation for SUMH protocol. More... | |
__EXPORT int | sumd_decode (uint8_t byte, uint8_t *rssi, uint8_t *rx_count, uint16_t *channel_count, uint16_t *channels, uint16_t max_chan_count, bool *failsafe) |
Decoder for SUMD/SUMH protocol. More... | |
RC protocol definition for Graupner HoTT transmitter.
Definition in file sumd.h.
#define SUMD_HEADER_ID 0xA8 |
Definition at line 50 of file sumd.h.
Referenced by sumd_decode().
#define SUMD_ID_FAILSAFE 0x81 |
Definition at line 53 of file sumd.h.
Referenced by sumd_decode().
#define SUMD_ID_SUMD 0x01 |
Definition at line 52 of file sumd.h.
Referenced by sumd_decode().
#define SUMD_ID_SUMH 0x00 |
Definition at line 51 of file sumd.h.
Referenced by sumd_decode().
#define SUMD_MAX_CHANNELS 32 |
Definition at line 48 of file sumd.h.
Referenced by sumd_decode().
uint16_t sumd_crc16 | ( | uint16_t | crc, |
uint8_t | value | ||
) |
CRC16 implementation for SUMD protocol.
crc | Initial CRC Value |
value | to accumulate in the checksum |
Definition at line 93 of file sumd.cpp.
Referenced by sumd_decode().
uint8_t sumd_crc8 | ( | uint8_t | crc, |
uint8_t | value | ||
) |
CRC8 implementation for SUMH protocol.
crc | Initial CRC Value |
value | to accumulate in the checksum |
Definition at line 105 of file sumd.cpp.
Referenced by sumd_decode().
__EXPORT int sumd_decode | ( | uint8_t | byte, |
uint8_t * | rssi, | ||
uint8_t * | rx_count, | ||
uint16_t * | channel_count, | ||
uint16_t * | channels, | ||
uint16_t | max_chan_count, | ||
bool * | failsafe | ||
) |
Decoder for SUMD/SUMH protocol.
byte | current char to read |
rssi | pointer to a byte where the RSSI value is written back to |
rx_count | pointer to a byte where the receive count of packets signce last wireless frame is written back to |
channels | pointer to a datastructure of size max_chan_count where channel values (12 bit) are written back to |
max_chan_count | maximum channels to decode - if more channels are decoded, the last n are skipped and success (0) is returned |
failsafe | pointer to a boolean where the decoded failsafe flag is written back to |
Definition at line 111 of file sumd.cpp.
References _crc16, _crc8, _crcOK, _debug, _decode_state, _rxlen, _sumd, ReceiverFcPacketHoTT::crc16_high, ReceiverFcPacketHoTT::crc16_low, ReceiverFcPacketHoTT::crc8, ReceiverFcPacketHoTT::header, ReceiverFcPacketHoTT::length, ReceiverFcPacketHoTT::status, sumd_crc16(), sumd_crc8(), ReceiverFcPacketHoTT::sumd_data, SUMD_DECODE_STATE_GOT_CRC, SUMD_DECODE_STATE_GOT_CRC16_BYTE_1, SUMD_DECODE_STATE_GOT_CRC16_BYTE_2, SUMD_DECODE_STATE_GOT_DATA, SUMD_DECODE_STATE_GOT_HEADER, SUMD_DECODE_STATE_GOT_LEN, SUMD_DECODE_STATE_GOT_STATE, SUMD_DECODE_STATE_UNSYNCED, SUMD_HEADER_ID, SUMD_ID_FAILSAFE, SUMD_ID_SUMD, SUMD_ID_SUMH, SUMD_MAX_CHANNELS, and ReceiverFcPacketHoTT::telemetry.
Referenced by RCInput::cycle(), dsm_port_input(), and RCTest::sumdTest().