From fc088ae764aebb3535da3651b3ccd24504dfa188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Spychalski?= Date: Fri, 22 Sep 2017 22:36:24 +0200 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 074ba16..0535a14 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,40 @@ # QuadMeUp_Crossbow Cheap DIY RC link based on LoRa 868MHz modules + +# Protocol + +| Byte | Description | Notes | +| ---- | ---- | ---- | +| 0 | Preamble | "Q" 0x51 | +| 1 | Frame type & Payload Length | bits 7-5 defines frame type, bits 4-0 payload length | +| 2 | Packet ID | | +| 4 - 36 | Payload | 32 bytes max | +| payload length + 3 | CRC | XOR of all previous bytes | + +## Frame types + +| Value | Description | Direction | +| ---- | ---- | ---- | +| 000 | RC channels data `RC_DATA` | TX -> RX | +| 001 | Receiver health and basic telemetry `RX_HEALTH` | RX -> TX | +| 010 | Request receiver configuration | TX -> RX | +| 011 | Receiver configuration | RX -> TX | +| 100 | Set receiver configuration | TX -> RX | + +### `RC_DATA` frame format + +Protocol allows to send 11 RC channels in total encoded as following + +* channels 1 to 6 encoded using 10 bits each +* channels 7 to 11 encoded using 4 bits per channel + +Total length of `RC_DATA` payload is 10 bytes + +### `RX_HEALTH` frame format + +| Byte | Description | +| ---- | ---- | +| 0 | RX RSSI | +| 1 | RX supply volatage, sent in 0,1V | +| 2 | RX analog input 1 sent in 0,1V | +| 3 | RX analog input 2 sent in 0,1V |