X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fproduct%2Fao_micropeak.c;h=8aac79cd141d4b6ed209836f80007116be5e6fa2;hb=3b4e3189211801c6f8f41c5d08c5a8551f28976c;hp=54522d869aa1a8e8f895b73b46fae1b518a80b09;hpb=d8e2b661e895fc59ded002a02191dcccce75f548;p=fw%2Faltos diff --git a/src/product/ao_micropeak.c b/src/product/ao_micropeak.c index 54522d86..8aac79cd 100644 --- a/src/product/ao_micropeak.c +++ b/src/product/ao_micropeak.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,7 +22,6 @@ #include #include -static struct ao_ms5607_sample sample; static struct ao_ms5607_value value; alt_t ground_alt, max_alt; @@ -30,8 +30,8 @@ alt_t ao_max_height; void ao_pa_get(void) { - ao_ms5607_sample(&sample); - ao_ms5607_convert(&sample, &value); + ao_ms5607_sample(&ao_ms5607_current); + ao_ms5607_convert(&ao_ms5607_current, &value); pa = value.pres; }