ao-test-baro: Be more lax about altitude checks
authorKeith Packard <keithp@keithp.com>
Fri, 21 Apr 2017 16:17:18 +0000 (09:17 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 21 Apr 2017 16:17:18 +0000 (09:17 -0700)
High pressure here today and the altimeter is reading -69m. Allow down
to -100m when testing baro values.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-test-baro/ao-test-baro.c

index d2b81e4f98fd0d8178e1803ad737194f905cc8e9..36c805c201bdb34181bd719b7c85b828eeccce00 100644 (file)
@@ -164,7 +164,7 @@ do_baro(struct cc_usb *usb) {
        double temperature = strtod(temp[2], NULL) / 100.0;
        double altitude = strtod(alt[1], NULL);
 
-       if (altitude < -50 || 3000 < altitude) {
+       if (altitude < -100 || 3000 < altitude) {
                printf ("weird altitude %f\n", altitude);
                free_baro(b);
                return 0;