summaryrefslogtreecommitdiff
path: root/ao-tools/lib/cc-telemetry.h
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
committerBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
commit02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch)
tree8356f4a019969ee99a45e264c87d38555cf316cc /ao-tools/lib/cc-telemetry.h
parent7a2e1f05adad990a6b161865267abf07ffec7a7e (diff)
parent7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff)
Merge branch 'branch-1.2' into debian
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