-static void compass_cal_init (FILE* data_file, struct sensor_info_t* info)
-{
-
-#ifdef DBG_RAW_DATA
- if (raw_data) {
- fclose(raw_data);
- raw_data = NULL;
- }
-
- if (raw_data_selected) {
- fclose(raw_data_selected);
- raw_data_selected = NULL;
- }
-
- char path[64];
- snprintf(path, 64, RAW_DATA_FULL_PATH, file_no);
- raw_data = fopen(path,"w+");
- snprintf(path, 64, RAW_DATA_SELECTED_PATH, file_no);
- raw_data_selected = fopen(path,"w+");
- file_no++;
- raw_data_count = 0;
-#endif
-
- struct compass_cal* cal_data = (struct compass_cal*) info->cal_data;