Files
QDAC-firmware/app/page/page_dparam.c
2024-07-13 19:00:45 +08:00

84 lines
2.1 KiB
C

#include "zf_common_headfile.h"
#include "page_ui_widget.h"
#include "page.h"
#include "jj_param.h"
#include "gl_data.h"
#include "gl_garage.h"
#include "gl_cross.h"
#include "gl_circle.h"
// #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, (Param_Data[delta_x].text));
ips200_show_string(20, 18 + 20, (Param_Data[delta_y].text));
}
/**
* @brief 页面退出事件
* @param 无
* @retval 无
*/
static void Exit()
{
}
/**
* @brief 页面循环执行的内容
* @param 无
* @retval 无
*/
static void Loop()
{
// 刷新参数数值
ips200_show_float(90, 18 + 2, *((float *)(Param_Data[delta_x].p_data)), 4, 5);
ips200_show_float(90, 18 + 20, FIX_BINTHRESHOLD, 4, 5);
ips200_show_int(90, 18 + 38, track_type, 1);
ips200_show_int(90, 18 + 56, garage_type, 1);
ips200_show_int(90, 18 + 74, cross_type, 1);
ips200_show_int(90, 18 + 92, circle_type, 2);
ips200_show_int(90, 18 + 110, s_type, 1);
ips200_show_float(90, 18 + 128, curvature, 4, 5);
ips200_show_int(90, 18 + 146, Lpt0_found_barrier_in, 1);
ips200_show_int(90, 18 + 164, Lpt1_found_barrier_in, 1);
}
/**
* @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);
}