/* * Copyright 2025 NXP * NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in * accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing, * activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to * comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license * terms, then you may not retain, install, activate or otherwise use the software. */ #ifndef GUI_GUIDER_H #define GUI_GUIDER_H #ifdef __cplusplus extern "C" { #endif #include "lvgl.h" typedef struct { lv_obj_t *scr_main; bool scr_main_del; lv_obj_t *scr_main_cont_base; lv_obj_t *scr_main_cont_status; lv_obj_t *scr_main_imgbtn_back; lv_obj_t *scr_main_imgbtn_back_label; lv_obj_t *scr_main_label_mode_storage; lv_obj_t *scr_main_label_mode_discharge; lv_obj_t *scr_main_label_mode_charge; lv_obj_t *scr_main_label_mode_balance; lv_obj_t *scr_main_cont_mainwindows; lv_obj_t *scr_main_imgbtn_add; lv_obj_t *scr_main_imgbtn_add_label; lv_obj_t *scr_main_imgbtn_dec; lv_obj_t *scr_main_imgbtn_dec_label; lv_obj_t *scr_main_cont_function; lv_obj_t *scr_main_imgbtn_storage; lv_obj_t *scr_main_imgbtn_storage_label; lv_obj_t *scr_main_imgbtn_discharge; lv_obj_t *scr_main_imgbtn_discharge_label; lv_obj_t *scr_main_imgbtn_charge; lv_obj_t *scr_main_imgbtn_charge_label; lv_obj_t *scr_main_imgbtn_balance; lv_obj_t *scr_main_imgbtn_balance_label; lv_obj_t *scr_main_cont_voltage; lv_obj_t *scr_main_label_bat_vol_1; lv_obj_t *scr_main_label_bat_vol_2; lv_obj_t *scr_main_label_bat_vol_3; lv_obj_t *scr_main_label_bat_vol_4; lv_obj_t *scr_main_label_bat_vol_5; lv_obj_t *scr_main_label_bat_vol_6; lv_obj_t *scr_main_label_bat_vol_12; lv_obj_t *scr_main_label_bat_vol_11; lv_obj_t *scr_main_label_bat_vol_10; lv_obj_t *scr_main_label_bat_vol_9; lv_obj_t *scr_main_label_bat_vol_8; lv_obj_t *scr_main_label_bat_vol_7; lv_obj_t *scr_main_label_bat_vol_24; lv_obj_t *scr_main_label_bat_vol_18; lv_obj_t *scr_main_label_bat_vol_23; lv_obj_t *scr_main_label_bat_vol_17; lv_obj_t *scr_main_label_bat_vol_22; lv_obj_t *scr_main_label_bat_vol_16; lv_obj_t *scr_main_label_bat_vol_21; lv_obj_t *scr_main_label_bat_vol_20; lv_obj_t *scr_main_label_bat_vol_15; lv_obj_t *scr_main_label_bat_vol_14; lv_obj_t *scr_main_label_bat_vol_19; lv_obj_t *scr_main_label_bat_vol_13; lv_obj_t *scr_main_cont_omu; lv_obj_t *scr_main_label_bat_omu_1; lv_obj_t *scr_main_label_bat_omu_2; lv_obj_t *scr_main_label_bat_omu_3; lv_obj_t *scr_main_label_bat_omu_4; lv_obj_t *scr_main_label_bat_omu_5; lv_obj_t *scr_main_label_bat_omu_6; lv_obj_t *scr_main_label_bat_omu_12; lv_obj_t *scr_main_label_bat_omu_11; lv_obj_t *scr_main_label_bat_omu_10; lv_obj_t *scr_main_label_bat_omu_9; lv_obj_t *scr_main_label_bat_omu_8; lv_obj_t *scr_main_label_bat_omu_7; lv_obj_t *scr_main_label_bat_omu_24; lv_obj_t *scr_main_label_bat_omu_18; lv_obj_t *scr_main_label_bat_omu_23; lv_obj_t *scr_main_label_bat_omu_17; lv_obj_t *scr_main_label_bat_omu_22; lv_obj_t *scr_main_label_bat_omu_16; lv_obj_t *scr_main_label_bat_omu_21; lv_obj_t *scr_main_label_bat_omu_20; lv_obj_t *scr_main_label_bat_omu_15; lv_obj_t *scr_main_label_bat_omu_14; lv_obj_t *scr_main_label_bat_omu_19; lv_obj_t *scr_main_label_bat_omu_13; lv_obj_t *scr_main_cont_device; lv_obj_t *scr_main_label_48; lv_obj_t *scr_main_label_input_voltage; lv_obj_t *scr_main_label_46; lv_obj_t *scr_main_label_bat_voltage; lv_obj_t *scr_main_label_44; lv_obj_t *scr_main_label_relay_in; lv_obj_t *scr_main_label_relay_out; lv_obj_t *scr_main_label_41; lv_obj_t *scr_main_label_40; lv_obj_t *scr_main_label_39; lv_obj_t *scr_main_label_output_voltage; lv_obj_t *scr_main_label_37; lv_obj_t *scr_main_label_fan_status; lv_obj_t *scr_main_label_relay_dis; lv_obj_t *scr_main_label_34; lv_obj_t *scr_main_label_33; lv_obj_t *scr_main_label_time_count; lv_obj_t *scr_main_label_run_status; lv_obj_t *scr_main_label_30; lv_obj_t *scr_main_label_temperature; lv_obj_t *scr_main_label_28; lv_obj_t *scr_main_label_output_current; lv_obj_t *scr_main_label_26; lv_obj_t *scr_main_label_25; lv_obj_t *scr_main_cont_setting; lv_obj_t *scr_main_label_49; lv_obj_t *scr_main_label_50; lv_obj_t *scr_main_label_51; lv_obj_t *scr_main_label_52; lv_obj_t *scr_main_label_53; lv_obj_t *scr_main_btn_setNumber; lv_obj_t *scr_main_btn_setNumber_label; lv_obj_t *scr_main_btn_setType; lv_obj_t *scr_main_btn_setType_label; lv_obj_t *scr_main_btn_setCapacity; lv_obj_t *scr_main_btn_setCapacity_label; lv_obj_t *scr_main_btn_setCurrent; lv_obj_t *scr_main_btn_setCurrent_label; lv_obj_t *scr_main_btn_setVoltage; lv_obj_t *scr_main_btn_setVoltage_label; lv_obj_t *scr_main_imgbtn_running_start; lv_obj_t *scr_main_imgbtn_running_start_label; lv_obj_t *scr_main_imgbtn_running_stop; lv_obj_t *scr_main_imgbtn_running_stop_label; lv_obj_t *scr_main_cont_system; lv_obj_t *scr_main_cont_running_curve; lv_obj_t *scr_main_dialog_setNumber; lv_obj_t *scr_main_dialog_title; lv_obj_t *scr_main_dialog_number_exit; lv_obj_t *scr_main_dialog_number_exit_label; lv_obj_t *scr_main_label_setNumber_title; lv_obj_t *scr_main_dialog_setNumber_Setting; lv_obj_t *scr_main_dialog_setNumber_Setting_label; lv_obj_t *scr_main_cont_7; lv_obj_t *scr_main_dialog_number_1; lv_obj_t *scr_main_dialog_number_1_label; lv_obj_t *scr_main_dialog_number_2; lv_obj_t *scr_main_dialog_number_2_label; lv_obj_t *scr_main_dialog_number_3; lv_obj_t *scr_main_dialog_number_3_label; lv_obj_t *scr_main_dialog_number_4; lv_obj_t *scr_main_dialog_number_4_label; lv_obj_t *scr_main_dialog_number_5; lv_obj_t *scr_main_dialog_number_5_label; lv_obj_t *scr_main_dialog_number_6; lv_obj_t *scr_main_dialog_number_6_label; lv_obj_t *scr_main_dialog_number_7; lv_obj_t *scr_main_dialog_number_7_label; lv_obj_t *scr_main_dialog_number_8; lv_obj_t *scr_main_dialog_number_8_label; lv_obj_t *scr_main_dialog_number_9; lv_obj_t *scr_main_dialog_number_9_label; lv_obj_t *scr_main_dialog_number_minus; lv_obj_t *scr_main_dialog_number_minus_label; lv_obj_t *scr_main_dialog_number_0; lv_obj_t *scr_main_dialog_number_0_label; lv_obj_t *scr_main_dialog_number_point; lv_obj_t *scr_main_dialog_number_point_label; lv_obj_t *scr_main_dialog_number_del; lv_obj_t *scr_main_dialog_number_del_label; lv_obj_t *scr_main_dialog_number_clear; lv_obj_t *scr_main_dialog_number_clear_label; lv_obj_t *scr_main_dialog_setNumber_label; lv_obj_t *scr_main_dialog_ExitWarning; lv_obj_t *scr_main_cont_2; lv_obj_t *scr_main_imgbtn_exitCancel; lv_obj_t *scr_main_imgbtn_exitCancel_label; lv_obj_t *scr_main_label_55; lv_obj_t *scr_main_btn_ExitConfirm; lv_obj_t *scr_main_btn_ExitConfirm_label; lv_obj_t *scr_main_cont_10; lv_obj_t *scr_main_label_60; lv_obj_t *scr_main_dialog_setType; lv_obj_t *scr_main_cont_4; lv_obj_t *scr_main_imgbtn_setTypeCancel; lv_obj_t *scr_main_imgbtn_setTypeCancel_label; lv_obj_t *scr_main_label_setType_title; lv_obj_t *scr_main_dialog_setType_Setting; lv_obj_t *scr_main_dialog_setType_Setting_label; lv_obj_t *scr_main_cont_8; lv_obj_t *scr_main_btn_setLiHv; lv_obj_t *scr_main_btn_setLiHv_label; lv_obj_t *scr_main_btn_setLiPo; lv_obj_t *scr_main_btn_setLiPo_label; lv_obj_t *scr_main_btn_setLilon; lv_obj_t *scr_main_btn_setLilon_label; lv_obj_t *scr_main_btn_setLiXX; lv_obj_t *scr_main_btn_setLiXX_label; lv_obj_t *scr_main_btn_setLiFe; lv_obj_t *scr_main_btn_setLiFe_label; lv_obj_t *scr_main_btn_setNiZn; lv_obj_t *scr_main_btn_setNiZn_label; lv_obj_t *scr_main_btn_setNiCd; lv_obj_t *scr_main_btn_setNiCd_label; lv_obj_t *scr_main_btn_setNiMe; lv_obj_t *scr_main_btn_setNiMe_label; lv_obj_t *scr_main_btn_setPb; lv_obj_t *scr_main_btn_setPb_label; lv_obj_t *scr_main_dialog_setType_label; lv_obj_t *scr_main_dialog_DetectWarning; lv_obj_t *scr_main_cont_6; lv_obj_t *scr_main_imgbtn_detectCancel; lv_obj_t *scr_main_imgbtn_detectCancel_label; lv_obj_t *scr_main_label_57; lv_obj_t *scr_main_btn_detectConfirm; lv_obj_t *scr_main_btn_detectConfirm_label; lv_obj_t *scr_main_cont_9; lv_obj_t *scr_main_label_61; }lv_ui; typedef void (*ui_setup_scr_t)(lv_ui * ui); void ui_init_style(lv_style_t * style); void ui_load_scr_animation(lv_ui *ui, lv_obj_t ** new_scr, bool new_scr_del, bool * old_scr_del, ui_setup_scr_t setup_scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, bool is_clean, bool auto_del); void ui_animation(void * var, uint32_t duration, int32_t delay, int32_t start_value, int32_t end_value, lv_anim_path_cb_t path_cb, uint32_t repeat_cnt, uint32_t repeat_delay, uint32_t playback_time, uint32_t playback_delay, lv_anim_exec_xcb_t exec_cb, lv_anim_start_cb_t start_cb, lv_anim_completed_cb_t ready_cb, lv_anim_deleted_cb_t deleted_cb); void init_scr_del_flag(lv_ui *ui); void setup_bottom_layer(void); void setup_ui(lv_ui *ui); void video_play(lv_ui *ui); void init_keyboard(lv_ui *ui); extern lv_ui guider_ui; void setup_scr_scr_main(lv_ui *ui); LV_IMAGE_DECLARE(_navback_RGB565A8_40x40); LV_IMAGE_DECLARE(_forward_RGB565A8_40x40); LV_IMAGE_DECLARE(_back_RGB565A8_40x40); LV_IMAGE_DECLARE(_storage_RGB565A8_120x160); LV_IMAGE_DECLARE(_discharge_RGB565A8_120x160); LV_IMAGE_DECLARE(_charge_RGB565A8_120x160); LV_IMAGE_DECLARE(_balance_RGB565A8_120x160); LV_IMAGE_DECLARE(_text_balance_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_DC_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_open_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_close_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_C_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_TC_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_CV_RGB565A8_120x35); LV_IMAGE_DECLARE(_text_CC_RGB565A8_120x35); LV_IMAGE_DECLARE(_start_RGB565A8_120x200); LV_IMAGE_DECLARE(_stop_RGB565A8_120x200); LV_FONT_DECLARE(lv_font_SourceHanSerifSC_Regular_24) LV_FONT_DECLARE(lv_font_montserratMedium_12) LV_FONT_DECLARE(lv_font_montserratMedium_16) LV_FONT_DECLARE(lv_font_SourceHanSerifSC_Regular_16) LV_FONT_DECLARE(lv_font_SourceHanSerifSC_Regular_12) LV_FONT_DECLARE(lv_font_arial_16) LV_FONT_DECLARE(lv_font_arial_12) #ifdef __cplusplus } #endif #endif