diff options
| author | Keith Packard <keithp@keithp.com> | 2009-04-17 23:38:14 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-04-17 23:38:14 -0700 |
| commit | 022f83ca6fd589005d8eb3e25e633950fef69fa7 (patch) | |
| tree | 4a081c02188cadbc93de00c96cd2f6a8f2b59d53 /gps-cksum | |
| parent | 5e2393eb6b1a6d7b180bd63d5165ee7b7ff5f9e0 (diff) | |
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 <keithp@keithp.com>
Diffstat (limited to 'gps-cksum')
| -rwxr-xr-x | gps-cksum | 17 |
1 files changed, 17 insertions, 0 deletions
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(); |
