summaryrefslogtreecommitdiff
path: root/ao-tools/lib/cc-telemetry.h
diff options
context:
space:
mode:
Diffstat (limited to 'ao-tools/lib/cc-telemetry.h')
-rw-r--r--ao-tools/lib/cc-telemetry.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ao-tools/lib/cc-telemetry.h b/ao-tools/lib/cc-telemetry.h
index e849cd3b..9a5be49f 100644
--- a/ao-tools/lib/cc-telemetry.h
+++ b/ao-tools/lib/cc-telemetry.h
@@ -237,7 +237,19 @@ union ao_telemetry_all {
struct ao_telemetry_baro baro;
};
+#define CC_TELEMETRY_HEADER "TELEM"
+
+/* "TELEM " 1 byte length 32 data bytes 1 rssi 1 status 1 checksum 1 null */
+
+#define CC_TELEMETRY_BUFSIZE (6 + (1 + 32 + 3) * 2 + 1)
+
int
cc_telemetry_parse(const char *input_line, union ao_telemetry_all *telemetry);
+uint8_t
+cc_telemetry_cksum(const union ao_telemetry_all *telemetry);
+
+void
+cc_telemetry_unparse(const union ao_telemetry_all *telemetry, char output_line[CC_TELEMETRY_BUFSIZE]);
+
#endif