diff options
author | Mike Beattie <mike@ethernal.org> | 2013-03-10 19:07:01 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2013-03-10 19:07:01 +1300 |
commit | d029acad6a992be9b7b4498e70605f8a1e1a4ef6 (patch) | |
tree | 851283be0bcb5915bd54e2c19073531336080bd5 /ao-tools/lib/cc-telemetry.h | |
parent | eba7b2ef8ef23bdb61b0390e47be6f27ffde31dc (diff) | |
parent | 72c5b1429bdfd6e9d2185bad7d0adb281fdf659a (diff) |
Merge branch 'master' into altosdroid
Diffstat (limited to 'ao-tools/lib/cc-telemetry.h')
-rw-r--r-- | ao-tools/lib/cc-telemetry.h | 12 |
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 |