gps: dump position in i2c message
[protos/imu.git] / main.c
diff --git a/main.c b/main.c
index 8502044..8f0f7ed 100644 (file)
--- a/main.c
+++ b/main.c
@@ -58,6 +58,7 @@
 #include "sd_log.h"
 #include "../fpv-common/i2c_commands.h"
 #include "i2c_protocol.h"
+#include "imu.h"
 #include "main.h"
 
 struct imuboard imuboard;
@@ -140,7 +141,6 @@ static void main_timer_interrupt(void)
 }
 
 /* XXX */
-int imu_loop(void);
 int sd_main(void);
 
 int main(void)
@@ -167,23 +167,23 @@ int main(void)
        /* communication with mpu6050 */
        i2cm_init();
 
-       /* i2c hw with mainboard */
+       /* i2c hw to communicate with mainboard */
        i2c_init(I2C_MODE_SLAVE, I2C_IMUBOARD_ADDR);
        i2c_protocol_init();
        i2c_register_recv_event(i2c_recvevent);
        i2c_register_send_event(i2c_sendevent);
 
-       sei();
-
        eeprom_load_config();
 
-       open_log_file();
+       sd_log_open();
+
+       sei();
 
        printf_P(PSTR("\r\n"));
        rdline_newline(&imuboard.rdl, imuboard.prompt);
 
        //sd_main();
-       //imu_init();
+       imu_init();
        //imu_loop();
        gps_venus_init();
        gps_loop();