altos: Allow megametrum to be built without using the mag sensor
[fw/altos] / src / core / ao_config.c
index 55ec9f406e35eb8e439b3092a123ae5a209bde12..cc580d666ede29b97dce87cccbec54b205719485 100644 (file)
@@ -81,6 +81,10 @@ _ao_config_get(void)
        if (ao_config_loaded)
                return;
 #if HAS_EEPROM
+       /* Yes, I know ao_storage_read calls ao_storage_setup,
+        * but ao_storage_setup *also* sets ao_storage_config, which we
+        * need before calling ao_storage_read here
+        */
        ao_storage_setup();
        ao_storage_read(ao_storage_config, &ao_config, sizeof (ao_config));
 #endif
@@ -256,8 +260,6 @@ ao_config_accel_calibrate_auto(char *orientation) __reentrant
        while (i) {
                ao_sleep(DATA_TO_XDATA(&ao_sample_data));
                while (i && cal_data_ring != ao_sample_data) {
-                       int16_t accel = ao_data_accel(&ao_data_ring[cal_data_ring]);
-                       printf ("accel %d\n", accel);
                        accel_total += (int32_t) ao_data_accel(&ao_data_ring[cal_data_ring]);
                        cal_data_ring = ao_data_ring_next(cal_data_ring);
                        i--;