mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
add PPS page (just ui)
This commit is contained in:
384
Power_Pico/User/GUI/screens/ui_PPSPage.c
Normal file
384
Power_Pico/User/GUI/screens/ui_PPSPage.c
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
// This file was generated by SquareLine Studio
|
||||||
|
// SquareLine Studio version: SquareLine Studio 1.5.4
|
||||||
|
// LVGL version: 9.2.2
|
||||||
|
// Project name: PowerPico
|
||||||
|
|
||||||
|
#include "../ui.h"
|
||||||
|
|
||||||
|
lv_obj_t * ui_PPSPage = NULL;
|
||||||
|
static lv_obj_t * ui_PanelPPSVol = NULL;
|
||||||
|
static lv_obj_t * ui_LabelPPSVol = NULL;
|
||||||
|
static lv_obj_t * ui_LabelPPSVolUnit = NULL;
|
||||||
|
static lv_obj_t * ui_PanelPPSCur = NULL;
|
||||||
|
static lv_obj_t * ui_LabelPPSCur = NULL;
|
||||||
|
static lv_obj_t * ui_LabelPPSCurUnit = NULL;
|
||||||
|
static lv_obj_t * ui_Spinner1 = NULL;
|
||||||
|
static lv_obj_t * ui_PanelPPS = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet1 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet1 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet2 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet2 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet3 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet3 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet4 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet4 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet5 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet5 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSet6 = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSet6 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnValSet = NULL;
|
||||||
|
static lv_obj_t * ui_LabelValSet = NULL;
|
||||||
|
static lv_obj_t * ui_BtnValDec = NULL;
|
||||||
|
static lv_obj_t * ui_LabelValDec = NULL;
|
||||||
|
static lv_obj_t * ui_BtnValInc = NULL;
|
||||||
|
static lv_obj_t * ui_LabelValInc = NULL;
|
||||||
|
static lv_obj_t * ui_BtnCurSet = NULL;
|
||||||
|
static lv_obj_t * ui_LabelValSet1 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnCurDec = NULL;
|
||||||
|
static lv_obj_t * ui_LabelValDec1 = NULL;
|
||||||
|
static lv_obj_t * ui_BtnCurInc = NULL;
|
||||||
|
static lv_obj_t * ui_LabelCurInc = NULL;
|
||||||
|
static lv_obj_t * ui_BtnSwitch = NULL;
|
||||||
|
static lv_obj_t * ui_LabelSwitch2fixed = NULL;
|
||||||
|
static lv_obj_t * ui_BtnClose = NULL;
|
||||||
|
static lv_obj_t * ui_LabelClose = NULL;
|
||||||
|
|
||||||
|
// event funtions
|
||||||
|
|
||||||
|
#include "key.h"
|
||||||
|
void ui_pps_page_key_handler(void* key_event)
|
||||||
|
{
|
||||||
|
if(((key_event_t*)key_event)->id == KEY_ID_B && ((key_event_t*)key_event)->type == KEY_EVT_CLICK)
|
||||||
|
{
|
||||||
|
lv_lib_pm_prev();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// build funtions
|
||||||
|
|
||||||
|
void ui_PPSPage_screen_init(void)
|
||||||
|
{
|
||||||
|
ui_PPSPage = lv_obj_create(NULL);
|
||||||
|
lv_obj_remove_flag(ui_PPSPage, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_PanelPPSVol = lv_obj_create(ui_PPSPage);
|
||||||
|
lv_obj_set_width(ui_PanelPPSVol, 80);
|
||||||
|
lv_obj_set_height(ui_PanelPPSVol, 35);
|
||||||
|
lv_obj_set_x(ui_PanelPPSVol, -30);
|
||||||
|
lv_obj_set_y(ui_PanelPPSVol, 10);
|
||||||
|
lv_obj_set_align(ui_PanelPPSVol, LV_ALIGN_TOP_MID);
|
||||||
|
lv_obj_remove_flag(ui_PanelPPSVol, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_PanelPPSVol, lv_color_hex(0xE36666), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui_PanelPPSVol, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelPPSVol = lv_label_create(ui_PanelPPSVol);
|
||||||
|
lv_obj_set_width(ui_LabelPPSVol, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelPPSVol, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelPPSVol, -12);
|
||||||
|
lv_obj_set_y(ui_LabelPPSVol, 0);
|
||||||
|
lv_obj_set_align(ui_LabelPPSVol, LV_ALIGN_RIGHT_MID);
|
||||||
|
lv_label_set_text(ui_LabelPPSVol, "5.42");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelPPSVol, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelPPSVolUnit = lv_label_create(ui_PanelPPSVol);
|
||||||
|
lv_obj_set_width(ui_LabelPPSVolUnit, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelPPSVolUnit, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelPPSVolUnit, 5);
|
||||||
|
lv_obj_set_y(ui_LabelPPSVolUnit, 0);
|
||||||
|
lv_obj_set_align(ui_LabelPPSVolUnit, LV_ALIGN_RIGHT_MID);
|
||||||
|
lv_label_set_text(ui_LabelPPSVolUnit, "V");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelPPSVolUnit, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_PanelPPSCur = lv_obj_create(ui_PPSPage);
|
||||||
|
lv_obj_set_width(ui_PanelPPSCur, 80);
|
||||||
|
lv_obj_set_height(ui_PanelPPSCur, 35);
|
||||||
|
lv_obj_set_x(ui_PanelPPSCur, 60);
|
||||||
|
lv_obj_set_y(ui_PanelPPSCur, 10);
|
||||||
|
lv_obj_set_align(ui_PanelPPSCur, LV_ALIGN_TOP_MID);
|
||||||
|
lv_obj_remove_flag(ui_PanelPPSCur, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_PanelPPSCur, lv_color_hex(0x42AA49), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui_PanelPPSCur, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelPPSCur = lv_label_create(ui_PanelPPSCur);
|
||||||
|
lv_obj_set_width(ui_LabelPPSCur, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelPPSCur, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelPPSCur, -12);
|
||||||
|
lv_obj_set_y(ui_LabelPPSCur, 0);
|
||||||
|
lv_obj_set_align(ui_LabelPPSCur, LV_ALIGN_RIGHT_MID);
|
||||||
|
lv_label_set_text(ui_LabelPPSCur, "2.25");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelPPSCur, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelPPSCurUnit = lv_label_create(ui_PanelPPSCur);
|
||||||
|
lv_obj_set_width(ui_LabelPPSCurUnit, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelPPSCurUnit, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelPPSCurUnit, 5);
|
||||||
|
lv_obj_set_y(ui_LabelPPSCurUnit, 0);
|
||||||
|
lv_obj_set_align(ui_LabelPPSCurUnit, LV_ALIGN_RIGHT_MID);
|
||||||
|
lv_label_set_text(ui_LabelPPSCurUnit, "A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelPPSCurUnit, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_Spinner1 = lv_spinner_create(ui_PPSPage);
|
||||||
|
//lv_spinner_set_anim_params(ui_Spinner1, 1000, 90);
|
||||||
|
lv_obj_set_width(ui_Spinner1, 25);
|
||||||
|
lv_obj_set_height(ui_Spinner1, 25);
|
||||||
|
lv_obj_set_x(ui_Spinner1, -90);
|
||||||
|
lv_obj_set_y(ui_Spinner1, 15);
|
||||||
|
lv_obj_set_align(ui_Spinner1, LV_ALIGN_TOP_MID);
|
||||||
|
lv_obj_remove_flag(ui_Spinner1, LV_OBJ_FLAG_CLICKABLE); /// Flags
|
||||||
|
lv_obj_set_style_arc_width(ui_Spinner1, 5, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
lv_obj_set_style_arc_width(ui_Spinner1, 5, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_PanelPPS = lv_obj_create(ui_PPSPage);
|
||||||
|
lv_obj_set_width(ui_PanelPPS, 480);
|
||||||
|
lv_obj_set_height(ui_PanelPPS, 110);
|
||||||
|
lv_obj_set_x(ui_PanelPPS, 120);
|
||||||
|
lv_obj_set_y(ui_PanelPPS, -10);
|
||||||
|
lv_obj_set_align(ui_PanelPPS, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_remove_flag(ui_PanelPPS, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_PanelPPS, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui_PanelPPS, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_color(ui_PanelPPS, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_opa(ui_PanelPPS, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet1 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet1, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet1, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet1, -175);
|
||||||
|
lv_obj_set_y(ui_BtnSet1, -35);
|
||||||
|
lv_obj_set_align(ui_BtnSet1, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet1, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_border_color(ui_BtnSet1, lv_color_hex(0xF40F0F), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_opa(ui_BtnSet1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_width(ui_BtnSet1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelSet1 = lv_label_create(ui_BtnSet1);
|
||||||
|
lv_obj_set_width(ui_LabelSet1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet1, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet1, "5V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet2 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet2, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet2, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet2, -65);
|
||||||
|
lv_obj_set_y(ui_BtnSet2, -35);
|
||||||
|
lv_obj_set_align(ui_BtnSet2, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet2, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelSet2 = lv_label_create(ui_BtnSet2);
|
||||||
|
lv_obj_set_width(ui_LabelSet2, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet2, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet2, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet2, "9V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet3 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet3, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet3, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet3, -175);
|
||||||
|
lv_obj_set_y(ui_BtnSet3, 0);
|
||||||
|
lv_obj_set_align(ui_BtnSet3, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet3, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelSet3 = lv_label_create(ui_BtnSet3);
|
||||||
|
lv_obj_set_width(ui_LabelSet3, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet3, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet3, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet3, "12V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet3, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet4 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet4, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet4, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet4, -65);
|
||||||
|
lv_obj_set_y(ui_BtnSet4, 0);
|
||||||
|
lv_obj_set_align(ui_BtnSet4, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet4, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet4, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelSet4 = lv_label_create(ui_BtnSet4);
|
||||||
|
lv_obj_set_width(ui_LabelSet4, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet4, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet4, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet4, "15V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet4, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet5 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet5, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet5, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet5, -175);
|
||||||
|
lv_obj_set_y(ui_BtnSet5, 35);
|
||||||
|
lv_obj_set_align(ui_BtnSet5, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet5, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelSet5 = lv_label_create(ui_BtnSet5);
|
||||||
|
lv_obj_set_width(ui_LabelSet5, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet5, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet5, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet5, "18V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet5, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSet6 = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnSet6, 100);
|
||||||
|
lv_obj_set_height(ui_BtnSet6, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSet6, -65);
|
||||||
|
lv_obj_set_y(ui_BtnSet6, 35);
|
||||||
|
lv_obj_set_align(ui_BtnSet6, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSet6, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSet6, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelSet6 = lv_label_create(ui_BtnSet6);
|
||||||
|
lv_obj_set_width(ui_LabelSet6, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSet6, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSet6, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSet6, "20V 1A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSet6, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnValSet = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnValSet, 100);
|
||||||
|
lv_obj_set_height(ui_BtnValSet, 40);
|
||||||
|
lv_obj_set_x(ui_BtnValSet, 120);
|
||||||
|
lv_obj_set_y(ui_BtnValSet, -25);
|
||||||
|
lv_obj_set_align(ui_BtnValSet, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnValSet, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnValSet, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelValSet = lv_label_create(ui_BtnValSet);
|
||||||
|
lv_obj_set_width(ui_LabelValSet, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelValSet, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelValSet, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelValSet, "5.00 V");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelValSet, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnValDec = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnValDec, 30);
|
||||||
|
lv_obj_set_height(ui_BtnValDec, 30);
|
||||||
|
lv_obj_set_x(ui_BtnValDec, 45);
|
||||||
|
lv_obj_set_y(ui_BtnValDec, -25);
|
||||||
|
lv_obj_set_align(ui_BtnValDec, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnValDec, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnValDec, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelValDec = lv_label_create(ui_BtnValDec);
|
||||||
|
lv_obj_set_width(ui_LabelValDec, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelValDec, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelValDec, 0);
|
||||||
|
lv_obj_set_y(ui_LabelValDec, -7);
|
||||||
|
lv_obj_set_align(ui_LabelValDec, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelValDec, "_");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelValDec, &lv_font_montserrat_20, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnValInc = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnValInc, 30);
|
||||||
|
lv_obj_set_height(ui_BtnValInc, 30);
|
||||||
|
lv_obj_set_x(ui_BtnValInc, 195);
|
||||||
|
lv_obj_set_y(ui_BtnValInc, -25);
|
||||||
|
lv_obj_set_align(ui_BtnValInc, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnValInc, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnValInc, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelValInc = lv_label_create(ui_BtnValInc);
|
||||||
|
lv_obj_set_width(ui_LabelValInc, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelValInc, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelValInc, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelValInc, "+");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelValInc, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnCurSet = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnCurSet, 100);
|
||||||
|
lv_obj_set_height(ui_BtnCurSet, 40);
|
||||||
|
lv_obj_set_x(ui_BtnCurSet, 120);
|
||||||
|
lv_obj_set_y(ui_BtnCurSet, 25);
|
||||||
|
lv_obj_set_align(ui_BtnCurSet, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnCurSet, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnCurSet, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelValSet1 = lv_label_create(ui_BtnCurSet);
|
||||||
|
lv_obj_set_width(ui_LabelValSet1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelValSet1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelValSet1, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelValSet1, "1.00 A");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelValSet1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnCurDec = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnCurDec, 30);
|
||||||
|
lv_obj_set_height(ui_BtnCurDec, 30);
|
||||||
|
lv_obj_set_x(ui_BtnCurDec, 45);
|
||||||
|
lv_obj_set_y(ui_BtnCurDec, 25);
|
||||||
|
lv_obj_set_align(ui_BtnCurDec, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnCurDec, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnCurDec, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelValDec1 = lv_label_create(ui_BtnCurDec);
|
||||||
|
lv_obj_set_width(ui_LabelValDec1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelValDec1, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_x(ui_LabelValDec1, 0);
|
||||||
|
lv_obj_set_y(ui_LabelValDec1, -7);
|
||||||
|
lv_obj_set_align(ui_LabelValDec1, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelValDec1, "_");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelValDec1, &lv_font_montserrat_20, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnCurInc = lv_button_create(ui_PanelPPS);
|
||||||
|
lv_obj_set_width(ui_BtnCurInc, 30);
|
||||||
|
lv_obj_set_height(ui_BtnCurInc, 30);
|
||||||
|
lv_obj_set_x(ui_BtnCurInc, 195);
|
||||||
|
lv_obj_set_y(ui_BtnCurInc, 25);
|
||||||
|
lv_obj_set_align(ui_BtnCurInc, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnCurInc, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnCurInc, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
|
||||||
|
ui_LabelCurInc = lv_label_create(ui_BtnCurInc);
|
||||||
|
lv_obj_set_width(ui_LabelCurInc, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelCurInc, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelCurInc, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelCurInc, "+");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelCurInc, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnSwitch = lv_button_create(ui_PPSPage);
|
||||||
|
lv_obj_set_width(ui_BtnSwitch, 210);
|
||||||
|
lv_obj_set_height(ui_BtnSwitch, 30);
|
||||||
|
lv_obj_set_x(ui_BtnSwitch, 0);
|
||||||
|
lv_obj_set_y(ui_BtnSwitch, 60);
|
||||||
|
lv_obj_set_align(ui_BtnSwitch, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnSwitch, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnSwitch, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_BtnSwitch, lv_color_hex(0x725C08), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui_BtnSwitch, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelSwitch2fixed = lv_label_create(ui_BtnSwitch);
|
||||||
|
lv_obj_set_width(ui_LabelSwitch2fixed, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelSwitch2fixed, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelSwitch2fixed, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelSwitch2fixed, "press here to Variable");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelSwitch2fixed, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_BtnClose = lv_button_create(ui_PPSPage);
|
||||||
|
lv_obj_set_width(ui_BtnClose, 210);
|
||||||
|
lv_obj_set_height(ui_BtnClose, 30);
|
||||||
|
lv_obj_set_x(ui_BtnClose, 0);
|
||||||
|
lv_obj_set_y(ui_BtnClose, 95);
|
||||||
|
lv_obj_set_align(ui_BtnClose, LV_ALIGN_CENTER);
|
||||||
|
lv_obj_add_flag(ui_BtnClose, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
||||||
|
lv_obj_remove_flag(ui_BtnClose, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||||
|
lv_obj_set_style_bg_color(ui_BtnClose, lv_color_hex(0x725C08), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui_BtnClose, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
ui_LabelClose = lv_label_create(ui_BtnClose);
|
||||||
|
lv_obj_set_width(ui_LabelClose, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_height(ui_LabelClose, LV_SIZE_CONTENT); /// 1
|
||||||
|
lv_obj_set_align(ui_LabelClose, LV_ALIGN_CENTER);
|
||||||
|
lv_label_set_text(ui_LabelClose, "press here to close PD");
|
||||||
|
lv_obj_set_style_text_font(ui_LabelClose, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ui_PPSPage_screen_destroy(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
27
Power_Pico/User/GUI/screens/ui_PPSPage.h
Normal file
27
Power_Pico/User/GUI/screens/ui_PPSPage.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// This file was generated by SquareLine Studio
|
||||||
|
// SquareLine Studio version: SquareLine Studio 1.5.4
|
||||||
|
// LVGL version: 9.2.2
|
||||||
|
// Project name: PowerPico
|
||||||
|
|
||||||
|
#ifndef UI_PPSPAGE_H
|
||||||
|
#define UI_PPSPAGE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// SCREEN: ui_PPSPage
|
||||||
|
void ui_PPSPage_screen_init(void);
|
||||||
|
void ui_PPSPage_screen_destroy(void);
|
||||||
|
extern lv_obj_t * ui_PPSPage;
|
||||||
|
|
||||||
|
void ui_pps_page_key_handler(void* key_event);
|
||||||
|
|
||||||
|
// CUSTOM VARIABLES
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /*extern "C"*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
Reference in New Issue
Block a user