Skip to content

Commit

Permalink
fixed main menu not showing the correct reflow profile label
Browse files Browse the repository at this point in the history
  • Loading branch information
dartcom committed Aug 15, 2023
1 parent a185208 commit 82d3580
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions software/main/config_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ void _config_menu(enum states* state){
case (1):
printf("Profile\n");
reflow_selected_params->profile = (struct reflow_profile*)config_list[1].items_array[config_list[1].selected_index].data;
profile_selected = config_list[1].selected_index;
break;
case (2):
printf("Sensor\n");
Expand Down
2 changes: 1 addition & 1 deletion software/main/defines.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ esp_err_t init_data(){
reflow_selected_params->fans = 4;
reflow_selected_params->function = 4;
reflow_selected_params->heat = 4;
reflow_selected_params->profile = NULL;
reflow_selected_params->profile = &profiles[profile_selected];
reflow_selected_params->sensor = 4;
return ESP_OK;
}
Expand Down
1 change: 1 addition & 0 deletions software/main/main_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void _main_menu(enum states* state){
lv_label_set_align(main_menu_item1_content, LV_LABEL_ALIGN_LEFT);
if(profiles != NULL){
lv_label_set_text(main_menu_item1_content, profiles[profile_selected].label);
printf("PROFILE SELECTED %s", reflow_selected_params->profile->label);
}

lv_obj_set_size(main_menu_item1_content, lv_obj_get_width(main_menu_item1)-(7*2), lv_obj_get_height(main_menu_item1)-27);
Expand Down

0 comments on commit 82d3580

Please sign in to comment.