Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / product / ao_micropeak.c
index 10f0d19206e436e08912fc69616a41c453a1ca25..8fed3069a3eef7eefe3081a13c4dae1908a7be14 100644 (file)
@@ -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 <ao_log_micro.h>
 #include <ao_async.h>
 
-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;
 }
 
@@ -57,7 +57,7 @@ ao_pips(void)
 int
 main(void)
 {
-       ao_led_init(LEDS_AVAILABLE);
+       ao_led_init();
        ao_timer_init();
 
        /* Init external hardware */
@@ -73,8 +73,9 @@ main(void)
        ao_report_altitude();
        ao_pips();
        ao_log_micro_dump();
-       
+#if BOOST_DELAY        
        ao_delay(BOOST_DELAY);
+#endif
 
        ao_microflight();