Skip to content

Commit

Permalink
Fix missing fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-github committed May 14, 2024
1 parent b8b9312 commit fafd356
Show file tree
Hide file tree
Showing 44 changed files with 15,986 additions and 15,600 deletions.
237 changes: 119 additions & 118 deletions components/lvgl/src/font/lv_font_montserrat_10.c

Large diffs are not rendered by default.

235 changes: 118 additions & 117 deletions components/lvgl/src/font/lv_font_montserrat_12.c

Large diffs are not rendered by default.

267 changes: 135 additions & 132 deletions components/lvgl/src/font/lv_font_montserrat_14.c

Large diffs are not rendered by default.

324 changes: 162 additions & 162 deletions components/lvgl/src/font/lv_font_montserrat_16.c

Large diffs are not rendered by default.

373 changes: 189 additions & 184 deletions components/lvgl/src/font/lv_font_montserrat_18.c

Large diffs are not rendered by default.

415 changes: 210 additions & 205 deletions components/lvgl/src/font/lv_font_montserrat_20.c

Large diffs are not rendered by default.

435 changes: 221 additions & 214 deletions components/lvgl/src/font/lv_font_montserrat_22.c

Large diffs are not rendered by default.

511 changes: 257 additions & 254 deletions components/lvgl/src/font/lv_font_montserrat_24.c

Large diffs are not rendered by default.

579 changes: 291 additions & 288 deletions components/lvgl/src/font/lv_font_montserrat_26.c

Large diffs are not rendered by default.

636 changes: 321 additions & 315 deletions components/lvgl/src/font/lv_font_montserrat_28.c

Large diffs are not rendered by default.

703 changes: 357 additions & 346 deletions components/lvgl/src/font/lv_font_montserrat_30.c

Large diffs are not rendered by default.

767 changes: 387 additions & 380 deletions components/lvgl/src/font/lv_font_montserrat_32.c

Large diffs are not rendered by default.

851 changes: 430 additions & 421 deletions components/lvgl/src/font/lv_font_montserrat_34.c

Large diffs are not rendered by default.

936 changes: 473 additions & 463 deletions components/lvgl/src/font/lv_font_montserrat_36.c

Large diffs are not rendered by default.

1,014 changes: 518 additions & 496 deletions components/lvgl/src/font/lv_font_montserrat_38.c

Large diffs are not rendered by default.

1,181 changes: 597 additions & 584 deletions components/lvgl/src/font/lv_font_montserrat_40.c

Large diffs are not rendered by default.

1,225 changes: 620 additions & 605 deletions components/lvgl/src/font/lv_font_montserrat_42.c

Large diffs are not rendered by default.

1,491 changes: 754 additions & 737 deletions components/lvgl/src/font/lv_font_montserrat_44.c

Large diffs are not rendered by default.

1,535 changes: 779 additions & 756 deletions components/lvgl/src/font/lv_font_montserrat_46.c

Large diffs are not rendered by default.

1,861 changes: 942 additions & 919 deletions components/lvgl/src/font/lv_font_montserrat_48.c

Large diffs are not rendered by default.

178 changes: 88 additions & 90 deletions components/lvgl/src/font/lv_font_montserrat_8.c

Large diffs are not rendered by default.

74 changes: 48 additions & 26 deletions main/display/cnc/grbl/screens/main_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
#include "esp3d_json_settings.h"
#include "gcode_host/esp3d_gcode_host_service.h"
#include "screens/menu_screen.h"
#include "esp3d_lvgl.h"
//#include "screens/positions_screen.h"
#include "translations/esp3d_translation_service.h"

/**********************
* STATIC PROTOTYPES
* Namespace
**********************/
namespace mainScreen {
//Static prototypes
//void main_display_positions();
void main_display_status_area();
void main_display_pause();
Expand All @@ -56,26 +58,32 @@ void main_display_files();
#endif // ESP3D_SD_CARD_FEATURE
void main_display_menu();

/**********************
* STATIC VARIABLES
**********************/
lv_timer_t *main_screen_delay_timer = NULL;
ESP3DScreenType next_screen = ESP3DScreenType::none;
bool intialization_done = false;
lv_obj_t *main_btn_position_x = nullptr;
lv_obj_t *main_btn_position_y = nullptr;
lv_obj_t *main_btn_position_z = nullptr;
lv_obj_t *main_btn_position_a = nullptr;

/**********************
* STATIC VARIABLES
**********************/
lv_obj_t *main_btn_reset = nullptr;
lv_obj_t *main_btn_switch_positions = nullptr;

//lv_obj_t *main_btn_positions = nullptr;
lv_obj_t *main_btn_files = nullptr;
lv_obj_t *main_btn_pause = nullptr;
lv_obj_t *main_btn_stop = nullptr;
lv_obj_t *main_btn_resume = nullptr;
lv_obj_t *main_label_progression_area = nullptr;
lv_obj_t *main_btn_menu = nullptr;
std::string progression_area_str = "";

/**********************
* GLOBAL FUNCTIONS
**********************/
std::string progression_area_str = "";

// bool position_value_cb(ESP3DValuesIndex index, const char *value,
// ESP3DValuesCbAction action) {
// if (action == ESP3DValuesCbAction::Update) {
Expand Down Expand Up @@ -303,18 +311,6 @@ void event_button_positions_handler(lv_event_t *e) {
}
}

// void event_button_fan_handler(lv_event_t *e) {
// esp3d_log("Fan Clicked");
// if (main_screen_delay_timer) return;
// next_screen = ESP3DScreenType::fan;
// if (ESP3D_BUTTON_ANIMATION_DELAY) {
// if (main_screen_delay_timer) return;
// main_screen_delay_timer = lv_timer_create(main_screen_delay_timer_cb,
// ESP3D_BUTTON_ANIMATION_DELAY, NULL);
// } else {
// main_screen_delay_timer_cb(NULL);
// }
// }

#if ESP3D_SD_CARD_FEATURE
void event_button_files_handler(lv_event_t *e) {
Expand Down Expand Up @@ -379,17 +375,31 @@ void create() {
}
// Background
lv_obj_t *ui_main_screen = lv_obj_create(NULL);
if (!lv_obj_is_valid(ui_main_screen)) {
esp3d_log_e("Failed to create main screen");
return;
}
// Display new screen and delete old one
lv_obj_t *ui_current_screen = lv_scr_act();
lv_scr_load(ui_main_screen);
ESP3DStyle::apply(ui_main_screen, ESP3DStyleType::main_bg);
lv_obj_del(ui_current_screen);

if (lv_obj_is_valid(ui_current_screen)){
lv_obj_del(ui_current_screen);
}
// Create status bar
lv_obj_t *ui_status_bar_container = statusBar::create(ui_main_screen);
if (!lv_obj_is_valid(ui_status_bar_container)) {
esp3d_log_e("Failed to create status bar");
return;
}
lv_obj_update_layout(ui_status_bar_container);

// create container for main screen buttons
lv_obj_t *ui_container_main_screen = lv_obj_create(ui_main_screen);
if (!lv_obj_is_valid(ui_container_main_screen)) {
esp3d_log_e("Failed to create main screen container");
return;
}
ESP3DStyle::apply(ui_container_main_screen, ESP3DStyleType::col_container);
lv_obj_clear_flag(ui_container_main_screen, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_size(ui_container_main_screen, LV_HOR_RES,
Expand All @@ -399,38 +409,50 @@ void create() {

// Add buttons top container to main container
lv_obj_t *ui_top_buttons_container = lv_obj_create(ui_container_main_screen);
if (!lv_obj_is_valid(ui_top_buttons_container)) {
esp3d_log_e("Failed to create top buttons container");
return;
}
ESP3DStyle::apply(ui_top_buttons_container, ESP3DStyleType::row_container);
lv_obj_set_size(ui_top_buttons_container, LV_HOR_RES, LV_SIZE_CONTENT);
ESP3DStyle::add_pad(ui_top_buttons_container);
lv_obj_clear_flag(ui_top_buttons_container, LV_OBJ_FLAG_SCROLLABLE);

// Middle container
lv_obj_t *ui_middle_container = lv_btn_create(ui_container_main_screen);
if (!lv_obj_is_valid(ui_middle_container)) {
esp3d_log_e("Failed to create middle container");
return;
}

ESP3DStyle::apply(ui_middle_container, ESP3DStyleType::row_container);
lv_obj_set_size(ui_middle_container, LV_HOR_RES, LV_SIZE_CONTENT);
ESP3DStyle::add_pad(ui_middle_container);

// Add buttons bottom container to main container
lv_obj_t *ui_bottom_buttons_container =
lv_obj_create(ui_container_main_screen);
if (!lv_obj_is_valid(ui_bottom_buttons_container)) {
esp3d_log_e("Failed to create bottom buttons container");
return;
}
ESP3DStyle::apply(ui_bottom_buttons_container, ESP3DStyleType::row_container);
lv_obj_set_size(ui_bottom_buttons_container, LV_HOR_RES, LV_SIZE_CONTENT);
ESP3DStyle::add_pad(ui_bottom_buttons_container);
lv_obj_clear_flag(ui_bottom_buttons_container, LV_OBJ_FLAG_SCROLLABLE);

// Create button and label for positions
// main_btn_positions = symbolButton::create(
// ui_top_buttons_container, "", ESP3D_BUTTON_WIDTH * 1.5, ESP3D_BUTTON_HEIGHT);

// lv_obj_add_event_cb(main_btn_positions, event_button_positions_handler,
// LV_EVENT_CLICKED, NULL);

// Create button and label for middle container
main_label_progression_area = lv_label_create(ui_middle_container);
ESP3DStyle::apply(main_label_progression_area, ESP3DStyleType::status_bar);

// Create button and label for reset
main_btn_reset = symbolButton::create(ui_middle_container,
LV_SYMBOL_RESET);

lv_obj_center(main_label_progression_area);
lv_obj_set_size(main_label_progression_area, ESP3D_STATUS_BAR_WIDTH,
lv_obj_set_size(main_label_progression_area, ESP3D_STATUS_BAR_WIDTH-ESP3D_SYMBOL_BUTTON_WIDTH,
ESP3D_STATUS_BAR_HEIGHT);

// Create button and label for pause
Expand Down
4 changes: 2 additions & 2 deletions scripts/fonts_builder/build_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
[0xf192,'LASER_2','fa-solid-900.ttf'],
[0xe4c3,'MILLING','fa-solid-900.ttf'],
[0xf3e5,'NEW_LINE','fa-solid-900.ttf'],
[0xf293,'BLUETOOTH','fa-solid-900.ttf'],
[0xf3c3,'M_POSITION','fa-solid-900.ttf'],
[0xf293,'BLUETOOTH','fa-brands-400.ttf'],
[0xf3c5,'M_POSITION','fa-solid-900.ttf'],
[0xf0a1,'MORE_INFO','fa-solid-900.ttf'],
[0xf055,'PLUS','fa-solid-900.ttf'],
[0xf056,'MINUS','fa-solid-900.ttf'],
Expand Down

0 comments on commit fafd356

Please sign in to comment.