@@ -30,8 +30,6 @@ lv_obj_t* batt_temp_label = NULL;
3030lv_obj_t * esc_temp_label = NULL ;
3131lv_obj_t * motor_temp_label = NULL ;
3232lv_obj_t * arm_indicator = NULL ;
33- lv_obj_t * spinner = NULL ; // For the spinning animation
34- lv_obj_t * spinner_overlay = NULL ; // Overlay for the spinner
3533lv_obj_t * batt_letter_label = NULL ; // Letter label for Battery temp
3634lv_obj_t * esc_letter_label = NULL ; // Letter label for ESC temp
3735lv_obj_t * motor_letter_label = NULL ; // Letter label for Motor temp
@@ -101,20 +99,6 @@ void init_temp_styles(bool darkMode) {
10199 lv_style_set_bg_opa (&style_critical, LV_OPA_100);
102100}
103101
104- // Function to show the loading overlay
105- void showLoadingOverlay () {
106- if (spinner_overlay != NULL ) {
107- lv_obj_remove_flag (spinner_overlay, LV_OBJ_FLAG_HIDDEN);
108- }
109- }
110-
111- // Function to hide the loading overlay
112- void hideLoadingOverlay () {
113- if (spinner_overlay != NULL ) {
114- lv_obj_add_flag (spinner_overlay, LV_OBJ_FLAG_HIDDEN);
115- }
116- }
117-
118102// Setup the main screen layout once
119103void setupMainScreen (bool darkMode) {
120104 if (main_screen != NULL ) {
@@ -540,35 +524,6 @@ void setupMainScreen(bool darkMode) {
540524 lv_obj_move_foreground (arm_fail_warning_icon_img); // Ensure icon is on top
541525 lv_obj_add_flag (arm_fail_warning_icon_img, LV_OBJ_FLAG_HIDDEN); // Hide initially
542526
543- // Create semi-transparent overlay for the spinner
544- spinner_overlay = lv_obj_create (main_screen);
545- lv_obj_set_size (spinner_overlay, SCREEN_WIDTH, SCREEN_HEIGHT);
546- lv_obj_set_pos (spinner_overlay, 0 , 0 );
547- lv_obj_set_style_bg_color (spinner_overlay, darkMode ? LVGL_BLACK : LVGL_WHITE, LV_PART_MAIN);
548- lv_obj_set_style_bg_opa (spinner_overlay, LV_OPA_70, LV_PART_MAIN); // 70% opacity
549- lv_obj_set_style_border_width (spinner_overlay, 0 , LV_PART_MAIN);
550-
551- // Create spinning animation at the top center - now place on top of overlay
552- spinner = lv_spinner_create (spinner_overlay);
553- lv_spinner_set_anim_params (spinner, 1000 , 60 ); // 1000ms period, 60 arc width
554- lv_obj_set_size (spinner, 80 , 80 ); // Even larger spinner for visibility
555- lv_obj_align (spinner, LV_ALIGN_CENTER, 0 , 0 ); // Position at center of screen
556-
557- // Make the spinner more visible with strong colors and good contrast
558- lv_obj_set_style_arc_width (spinner, 8 , LV_PART_INDICATOR); // Thicker arc for indicator
559- lv_obj_set_style_arc_width (spinner, 8 , LV_PART_MAIN); // Thicker background arc
560-
561- // Apply proper shading and gradients for a more attractive appearance
562- lv_obj_set_style_arc_rounded (spinner, true , LV_PART_INDICATOR);
563- lv_obj_set_style_arc_rounded (spinner, true , LV_PART_MAIN);
564-
565- // Set spinner colors with better contrast
566- lv_obj_set_style_arc_color (spinner, darkMode ? lv_color_make (100 , 100 , 100 ) : lv_color_make (230 , 230 , 230 ), LV_PART_MAIN);
567- lv_obj_set_style_arc_color (spinner, lv_palette_main (LV_PALETTE_BLUE), LV_PART_INDICATOR);
568-
569- // Hide the overlay by default
570- lv_obj_add_flag (spinner_overlay, LV_OBJ_FLAG_HIDDEN);
571-
572527 // Create climb rate indicator horizontal divider lines in the far-right section
573528 const int climb_section_start_y = 37 ;
574529 const int climb_section_end_y = 128 ;
0 commit comments