Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / kernel / ao_log_mega.c
index 8997fd0596f19f63b7a3cab772ceefaa12f03941..b86abe7af8ebec882225c88c4f5e34619ff13195 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;
@@ -135,8 +135,8 @@ ao_log(void)
 #endif
 #if HAS_HMC5883
                                log.u.sensor.mag_x = ao_data_ring[ao_log_data_pos].hmc5883.x;
-                               log.u.sensor.mag_y = ao_data_ring[ao_log_data_pos].hmc5883.y;
                                log.u.sensor.mag_z = ao_data_ring[ao_log_data_pos].hmc5883.z;
+                               log.u.sensor.mag_y = ao_data_ring[ao_log_data_pos].hmc5883.y;
 #endif
                                log.u.sensor.accel = ao_data_accel(&ao_data_ring[ao_log_data_pos]);
                                ao_log_mega(&log);