jgauchia / IceNav-v3

ESP32 Based GPS Navigator with OSM offline maps. (Under development)
GNU General Public License v3.0
50 stars 11 forks source link

where is the Compass Calibration #112

Closed zhjygit closed 2 months ago

zhjygit commented 2 months ago

now,i connect my makefabs board with the mpu9250. contrast to my phone compass, i find that the mpu920 compass pointing is huge different with the compass on the phone. I have changed the value float declinationAngle =0.05 according to my location(-3°13′ west). i find that the Compass Calibration code. void create_settings_scr() { // Settings Screen settingsScreen = lv_obj_create(NULL); lv_obj_set_size(settingsScreen, TFT_WIDTH, TFT_HEIGHT); lv_obj_set_pos(settingsScreen, 0, 0); lv_obj_set_flex_flow(settingsScreen, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_align(settingsScreen, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);

lv_obj_t *but_label;

// Compass Calibration
lv_obj_t *compass_calib_but = lv_btn_create(settingsScreen);
lv_obj_set_size(compass_calib_but, TFT_WIDTH - 30, 40);
but_label = lv_label_create(compass_calib_but);
lv_obj_set_style_text_font(but_label, &lv_font_montserrat_20, 0);
lv_label_set_text_static(but_label, "Compass Calibration");
lv_obj_center(but_label);
lv_obj_add_event_cb(compass_calib_but, compass_calib, LV_EVENT_CLICKED, NULL);

// Touch Calibration
lv_obj_t *touch_calib_but = lv_btn_create(settingsScreen);
lv_obj_set_size(touch_calib_but, TFT_WIDTH - 30, 40);
but_label = lv_label_create(touch_calib_but);
lv_obj_set_style_text_font(but_label, &lv_font_montserrat_20, 0);
lv_label_set_text_static(but_label, "Touch Calibration");
lv_obj_center(but_label);
lv_obj_add_event_cb(touch_calib_but, touch_calib, LV_EVENT_CLICKED, NULL);

// Back button
lv_obj_t *back_but = lv_btn_create(settingsScreen);
lv_obj_set_size(back_but, TFT_WIDTH - 30, 40);
but_label = lv_label_create(back_but);
lv_obj_set_style_text_font(but_label, &lv_font_montserrat_20, 0);
lv_label_set_text_static(but_label, "Back");
lv_obj_center(but_label);
lv_obj_add_event_cb(back_but, back, LV_EVENT_CLICKED, NULL);

}

however, when the device boot, there is just some text about memory free xxxxx, and then quickly jump to search sat. I cannot get into the Compass Calibration button.

jgauchia commented 2 months ago

Compass calibration is in settings screen,

In the main screen you have a settings icons, if you press this a new screen with compass and touch calibration appears.

This feature still not full implemented.