112 lines
2.8 KiB
C
112 lines
2.8 KiB
C
#include "zf_common_headfile.h"
|
|
#include "page_ui_widget.h"
|
|
#include "page.h"
|
|
|
|
#include "jj_blueteeth.h"
|
|
#include "gl_data.h"
|
|
|
|
#define LINE_HEAD 11
|
|
#define LINE_END 16
|
|
|
|
static int8_t Curser = LINE_HEAD; // 定义光标位置
|
|
static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
|
|
/***************************************************************************************
|
|
*
|
|
* 以下为页面模板函数
|
|
*
|
|
***************************************************************************************/
|
|
|
|
/**
|
|
* @brief 页面初始化事件
|
|
* @param 无
|
|
* @retval 无
|
|
*/
|
|
static void Setup()
|
|
{
|
|
ips200_clear();
|
|
// Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
|
|
|
ips200_show_string(5, 165, "pts_l:");
|
|
ips200_show_string(5, 185, "pts_r:");
|
|
ips200_show_string(5, 205, "con_l:");
|
|
ips200_show_string(5, 224, "con_r:");
|
|
ips200_show_string(100, 165, "lpt0: ");
|
|
ips200_show_string(100, 185, "lpt1: ");
|
|
ips200_show_string(100, 205, "lptin0: ");
|
|
ips200_show_string(100, 224, "lptin1: ");
|
|
}
|
|
|
|
/**
|
|
* @brief 页面退出事件
|
|
* @param 无
|
|
* @retval 无
|
|
*/
|
|
static void Exit()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief 页面循环执行的内容
|
|
* @param 无
|
|
* @retval 无
|
|
*/
|
|
static void Loop()
|
|
{
|
|
Show_Marked_Image();
|
|
ips200_show_uint(60, 165, pts_inv_l_count, 3);
|
|
ips200_show_uint(60, 185, pts_inv_r_count, 3);
|
|
ips200_show_uint(60, 205, Lpt0_found, 3);
|
|
ips200_show_uint(60, 224, Lpt1_found, 3);
|
|
ips200_show_uint(160, 165, Lpt0_found_barrier, 3);
|
|
ips200_show_uint(160, 185, Lpt1_found_barrier, 3);
|
|
ips200_show_uint(160, 205, Lpt0_found_barrier_in, 3);
|
|
ips200_show_uint(160, 224, Lpt1_found_barrier_in, 3);
|
|
ips200_show_uint(200, 165, barrier_type, 3);
|
|
ips200_show_uint(200, 185, time_barrier, 5);
|
|
}
|
|
|
|
/**
|
|
* @brief 页面事件
|
|
* @param btn:发出事件的按键
|
|
* @param event:事件编号
|
|
* @retval 无
|
|
*/
|
|
static void Event(page_event event)
|
|
{
|
|
Curser_Last = Curser;
|
|
|
|
if (page_event_forward == event) {
|
|
// Curser--; // 光标上移
|
|
} else if (page_event_backward == event) {
|
|
// Curser++; // 光标下移
|
|
} else if (page_event_press_short == event) {
|
|
|
|
} else if (page_event_press_long == event) {
|
|
Page_Shift(page_menu);
|
|
}
|
|
|
|
if (Curser < LINE_HEAD) {
|
|
Curser = LINE_END;
|
|
} else if (Curser > LINE_END) {
|
|
Curser = LINE_HEAD;
|
|
}
|
|
|
|
// Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
|
}
|
|
|
|
/**
|
|
* @brief 页面注册函数
|
|
*
|
|
* @param pageID
|
|
*/
|
|
void PageRegister_page_rtcam(unsigned char pageID)
|
|
{
|
|
Page_Register(pageID, Setup, Loop, Exit, Event);
|
|
}
|
|
|
|
/***************************************************************************************
|
|
*
|
|
* 以下为页面自定义功能函数
|
|
*
|
|
***************************************************************************************/
|