123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /*
- * Copyright 2024 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.
- */
- /*********************
- * INCLUDES
- *********************/
- #include <stdio.h>
- #include <esp_app_desc.h>
- #include "lvgl.h"
- #include "custom.h"
- #include "wifi.h"
- #include "system/miscellaneous_interface.h"
- /*********************
- * DEFINES
- *********************/
- /**********************
- * TYPEDEFS
- **********************/
- /**********************
- * STATIC PROTOTYPES
- **********************/
- /**********************
- * STATIC VARIABLES
- **********************/
- /**
- * Create a demo application
- */
- void custom_init(lv_ui *ui) {
- /* Add your codes here */
- }
- void setting_page_init(lv_ui *ui) {
- static lv_style_t style_SettingPage_tabview_1_extra_btnm_items_default;
- ui_init_style(&style_SettingPage_tabview_1_extra_btnm_items_default);
- lv_style_set_text_color(&style_SettingPage_tabview_1_extra_btnm_items_default, lv_color_hex(0xffb204));
- lv_style_set_text_font(&style_SettingPage_tabview_1_extra_btnm_items_default, &lv_font_Alibaba_PuHuiTi_Medium_16);
- lv_style_set_text_opa(&style_SettingPage_tabview_1_extra_btnm_items_default, 255);
- lv_obj_add_style(lv_tabview_get_tab_bar(ui->SettingPage_tabview_1),
- &style_SettingPage_tabview_1_extra_btnm_items_default, LV_PART_MAIN | LV_STATE_DEFAULT);
- lv_label_set_text(ui->SettingPage_lab_wifi_status, get_wifi_status() == 1 ? "已连接" : "未连接");
- if(get_wifi_status())
- lv_obj_add_flag(ui->SettingPage_btn_1, LV_OBJ_FLAG_HIDDEN);
- // 填充“关于”页面信息
- esp_app_desc_t * desc = esp_app_get_description();
- lv_label_set_text(ui->SettingPage_lab_version, desc->version);
- char device_serial[12];
- get_device_serial(device_serial);
- lv_label_set_text(ui->SettingPage_lab_serial, device_serial);
- lv_qrcode_update(ui->SettingPage_qr_device_code, device_serial, 12);
- }
|