altoslib: fix computation of TeleGPS battery voltage
[fw/altos] / src / telelco-v0.1 / ao_lco.c
index 79f3896baff9a5adcb0f96785a0b43be0b812c46..649bf5864504e999e0016d1f51a624a75cf99d68 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
@@ -280,9 +281,7 @@ ao_lco_igniter_status(void)
        uint16_t        delay;
 
        for (;;) {
-//             ao_alarm(delay);
                ao_sleep(&ao_pad_query);
-//             ao_clear_alarm();
                if (!ao_lco_valid) {
                        ao_led_on(AO_LED_RED);
                        ao_led_off(AO_LED_GREEN);
@@ -364,9 +363,7 @@ ao_lco_monitor(void)
                        delay = AO_MS_TO_TICKS(100);
                else
                        delay = AO_SEC_TO_TICKS(1);
-               ao_alarm(delay);
-               ao_sleep(&ao_lco_armed);
-               ao_clear_alarm();
+               ao_sleep_for(&ao_lco_armed, delay);
        }
 }