2023-12-21 22:33:36 +08:00
|
|
|
#include "zf_common_headfile.h"
|
2024-01-08 22:30:20 +08:00
|
|
|
#include "page_ui_widget.h"
|
|
|
|
|
#include "page.h"
|
2023-12-21 22:33:36 +08:00
|
|
|
|
2024-03-10 21:21:01 +08:00
|
|
|
#include "jj_blueteeth.h"
|
|
|
|
|
#include "gl_data.h"
|
|
|
|
|
|
2024-01-04 22:07:13 +08:00
|
|
|
#define LINE_HEAD 11
|
2024-01-06 17:19:36 +08:00
|
|
|
#define LINE_END 16
|
2023-12-21 22:33:36 +08:00
|
|
|
|
2024-01-04 22:07:13 +08:00
|
|
|
static int8_t Curser = LINE_HEAD; // 定义光标位置
|
|
|
|
|
static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
|
2023-12-21 22:33:36 +08:00
|
|
|
/***************************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* 以下为页面模板函数
|
|
|
|
|
*
|
|
|
|
|
***************************************************************************************/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 页面初始化事件
|
|
|
|
|
* @param 无
|
|
|
|
|
* @retval 无
|
|
|
|
|
*/
|
|
|
|
|
static void Setup()
|
|
|
|
|
{
|
2024-01-04 22:07:13 +08:00
|
|
|
ips200_clear();
|
2024-03-17 12:14:36 +08:00
|
|
|
// Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
2024-03-15 10:39:25 +08:00
|
|
|
|
|
|
|
|
ips200_show_string(5, 165, "pts_l:");
|
|
|
|
|
ips200_show_string(5, 185, "pts_r:");
|
2024-03-17 12:14:36 +08:00
|
|
|
ips200_show_string(5, 205, "con_l:");
|
|
|
|
|
ips200_show_string(5, 224, "con_r:");
|
|
|
|
|
ips200_show_string(100, 165, "dir_l:");
|
|
|
|
|
ips200_show_string(100, 185, "dir_r:");
|
2023-12-21 22:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 页面退出事件
|
|
|
|
|
* @param 无
|
|
|
|
|
* @retval 无
|
|
|
|
|
*/
|
|
|
|
|
static void Exit()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 页面循环执行的内容
|
|
|
|
|
* @param 无
|
|
|
|
|
* @retval 无
|
|
|
|
|
*/
|
|
|
|
|
static void Loop()
|
|
|
|
|
{
|
2024-01-04 22:07:13 +08:00
|
|
|
Show_Marked_Image();
|
2024-03-15 10:39:25 +08:00
|
|
|
ips200_show_uint(60, 165, pts_inv_l_count, 3);
|
|
|
|
|
ips200_show_uint(60, 185, pts_inv_r_count, 3);
|
2024-03-17 12:14:36 +08:00
|
|
|
ips200_show_uint(60, 205, Lpt0_found, 3);
|
|
|
|
|
ips200_show_uint(60, 224, Lpt1_found, 3);
|
|
|
|
|
ips200_show_uint(160, 165, is_straight0, 3);
|
|
|
|
|
ips200_show_uint(160, 185, is_straight1, 3);
|
2023-12-21 22:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 页面事件
|
|
|
|
|
* @param btn:发出事件的按键
|
|
|
|
|
* @param event:事件编号
|
|
|
|
|
* @retval 无
|
|
|
|
|
*/
|
|
|
|
|
static void Event(page_event event)
|
|
|
|
|
{
|
|
|
|
|
Curser_Last = Curser;
|
|
|
|
|
|
|
|
|
|
if (page_event_forward == event) {
|
2024-03-17 12:14:36 +08:00
|
|
|
// Curser--; // 光标上移
|
2023-12-21 22:33:36 +08:00
|
|
|
} else if (page_event_backward == event) {
|
2024-03-17 12:14:36 +08:00
|
|
|
// Curser++; // 光标下移
|
2024-01-05 15:55:17 +08:00
|
|
|
} else if (page_event_press_short == event) {
|
|
|
|
|
|
|
|
|
|
} else if (page_event_press_long == event) {
|
|
|
|
|
Page_Shift(page_menu);
|
2023-12-21 22:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Curser < LINE_HEAD) {
|
|
|
|
|
Curser = LINE_END;
|
|
|
|
|
} else if (Curser > LINE_END) {
|
|
|
|
|
Curser = LINE_HEAD;
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-17 12:14:36 +08:00
|
|
|
// Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
2023-12-21 22:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 页面注册函数
|
|
|
|
|
*
|
|
|
|
|
* @param pageID
|
|
|
|
|
*/
|
|
|
|
|
void PageRegister_page_rtcam(unsigned char pageID)
|
|
|
|
|
{
|
2024-03-02 16:17:34 +08:00
|
|
|
Page_Register(pageID, Setup, Loop, Exit, Event);
|
2023-12-21 22:33:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***************************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* 以下为页面自定义功能函数
|
|
|
|
|
*
|
|
|
|
|
***************************************************************************************/
|