From 022f83ca6fd589005d8eb3e25e633950fef69fa7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 17 Apr 2009 23:38:14 -0700 Subject: Add gps, debug dongle support and pressure alt tables GPS also pulled in serial support. The altitude tables take raw 11-bit pressure sample numbers and convert them to standard pressure altitude values. Signed-off-by: Keith Packard --- gps-cksum | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 gps-cksum (limited to 'gps-cksum') diff --git a/gps-cksum b/gps-cksum new file mode 100755 index 00000000..a08153bf --- /dev/null +++ b/gps-cksum @@ -0,0 +1,17 @@ +#!/usr/bin/env nickle + +int checksum(string a) +{ + int c = 0; + for (int i = 0; i < String::length(a); i++) + c ^= a[i]; + return c; +} + +void main() +{ + for (int i = 1; i < dim(argv); i++) + printf ("$%s*%02x\n", argv[i], checksum(argv[i])); +} + +main(); -- cgit v1.2.3