AlfredoSystems / AlfredoCRSF

Arduino CRSF library for ELRS
GNU General Public License v3.0
11 stars 5 forks source link

AlfredoCRSF - CSRF serial protocol Arduino library

This repo is based on CapnBry's CRSF code, it has been modified to match the format of standard Arduino Library. Keywords and example files included. It has also now been extended to support more telemetry packet types. Check out the example files to learn more.

TODO:

CRSF protocol specification

The CRSF protocol is not documented or maintained by one single entity. The following specification has been cobbled together from the ELRS, EdgeTX and OpenTX project codebases.

Packet Format

[dest] [len] [type] [payload] [crc8]

DEST - Destination address or "sync" byte

LEN - Length of bytes that follow

Overall packet length is PayloadLength+4 (dest, len, type, crc), or LEN+2 (dest, len).

TYPE - CRSF_FRAMETYPE

CRC - CRC8 using poly 0xD5

Includes all bytes from type (buffer[2]) to end of payload.

Payload of each frametype

CRSF_FRAMETYPE_GPS = 0x02