feat:完成ui设计

This commit is contained in:
2024-02-24 15:06:30 +08:00
parent 27c50ceea8
commit bdd69e2e59
11 changed files with 364 additions and 206 deletions

71
app/page/page_dparam.c Normal file
View File

@@ -0,0 +1,71 @@
#include "zf_common_headfile.h"
#include "page_ui_widget.h"
#include "page.h"
float ddata0=0.0f;
// #define LINE_HEAD 1
// #define LINE_END 7
// static int8_t Curser = LINE_HEAD; // 定义光标位置
// static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
/***************************************************************************************
*
* 以下为页面模板函数
*
***************************************************************************************/
/**
* @brief 页面初始化事件
* @param 无
* @retval 无
*/
static void Setup()
{
ips200_clear();
// 显示参数名称
ips200_show_string(0, 0, "Dparam");
ips200_show_string(20, 18 + 2, "ddata0:");
}
/**
* @brief 页面退出事件
* @param 无
* @retval 无
*/
static void Exit()
{
}
/**
* @brief 页面循环执行的内容
* @param 无
* @retval 无
*/
static void Loop()
{
// 刷新参数数值
ips200_show_float(80, 18 + 2, ddata0, 4, 5);
ddata0+=0.01f;
}
/**
* @brief 页面事件
* @param btn:发出事件的按键
* @param event:事件编号
* @retval 无
*/
static void Event(page_event event)
{
if (page_event_press_long == event) {
Page_Shift(page_menu);
}
}
/**
* @brief 页面注册函数
*
* @param pageID
*/
void PageRegister_page_dparam(unsigned char pageID)
{
Page_Register(pageID, Setup, Loop, Exit, Event);
}