Switch from GPLv2 to GPLv2+
[fw/altos] / src / kernel / ao_log_mega.c
index 768947d541728159f7e86d16c30d2122ad4a4914..a0212198d3a0ae70128fc3198d259c14b9446ccb 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
@@ -20,7 +21,6 @@
 #include <ao_data.h>
 #include <ao_flight.h>
 
-static __xdata uint8_t ao_log_mutex;
 static __xdata struct ao_log_mega log;
 
 __code uint8_t ao_log_format = AO_LOG_FORMAT_TELEMEGA;
@@ -65,7 +65,7 @@ ao_log_dump_check_data(void)
        return 1;
 }
 
-#if HAS_ADC
+#if HAS_FLIGHT
 static __data uint8_t  ao_log_data_pos;
 
 /* a hack to make sure that ao_log_megas fill the eeprom block in even units */
@@ -100,9 +100,9 @@ ao_log(void)
        log.u.flight.ground_accel_along = ao_ground_accel_along;
        log.u.flight.ground_accel_across = ao_ground_accel_across;
        log.u.flight.ground_accel_through = ao_ground_accel_through;
+       log.u.flight.ground_roll = ao_ground_roll;
        log.u.flight.ground_pitch = ao_ground_pitch;
        log.u.flight.ground_yaw = ao_ground_yaw;
-       log.u.flight.ground_roll = ao_ground_roll;
 #endif
        log.u.flight.ground_pres = ao_ground_pres;
        log.u.flight.flight = ao_flight_number;
@@ -183,7 +183,7 @@ ao_log(void)
                        ao_sleep(&ao_log_running);
        }
 }
-#endif
+#endif /* HAS_FLIGHT */
 
 uint16_t
 ao_log_flight(uint8_t slot)