sggt/App/APP_WU/Inc/apps_gather.h

126 lines
3.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Author: wujunchao wujunchao@wuxismart.com
* @Date: 2024-12-27 11:51:06
* @LastEditors: wujunchao wujunchao@wuxismart.com
* @LastEditTime: 2025-01-13 19:24:32
* @FilePath: \signal_generator\App\APP_WU\Inc\apps_gather.h
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#ifndef __APPS_GATHER_H
#define __APPS_GATHER_H
//provided by ZhangXiaoMing
#include "main.h"
#include "tm1650.h"
#include "mux_signal.h"
#include "JLX240-00301-BN.h"
#include <string.h>
#include "gpio.h"
#include "modbus.h"
#include "ble.h"
#include "hart.h"
#include "rn7302.h"
#include "SIG24130.h"
#include "FreeRTOS.h"
#include "task.h"
//LVGL
#include "lvgl.h" // 它为整个LVGL提供了更完整的头文件引用
#include "lv_port_disp.h" // LVGL的显示
#include "gui_guider.h" // Gui Guider 生成的界面和控件的声明
#include "events_init.h" // Gui Guider 生成的初始化事件、回调函数
extern lv_ui guider_ui;
extern const lv_img_dsc_t * screen_main_animimg_1_imgs[6];
//written bt WuJunChao
#include "timer.h"
#include "stdio.h"
#include "lv_demo_benchmark.h"
#define KEY_OUT 76
#define KEY_UP 84
#define KEY_MENU 92
#define KEY_IN 69
#define KEY_LEFT 77
#define KEY_OK 85
#define KEY_RIGHT 93
#define KEY_SWITCH 101
#define KEY_SOURCE 78
#define KEY_DOWN 86
#define KEY_BACK 94
#define SCREEN_INIT 0
#define SCREEN_INIT_CNT_MAX 4
#define SCREEN_MAIN 1
#define IO_CURSOR_START1 149 //用于改变直线位置
#define IO_CURSOR_START2 209
#define IO_CURSOR_INTERVAL 17
#define SCREEN_SETTING 2
// void menu_test2(void); //竖屏3个进度条sggt_test_02
// void menu_test3(void); //横屏2个界面sggt_test_03
/**********test4**********/
// void menu_test4(void); //横屏3个界面开机动画、简易信号发生器、详细设置
// void scr_init_run(void); //起始界面
// void scr_main_run(void); //主界面
// void nowtime_show(void); //运行时间显示
// void battery_show(void); //电池电量显示
// void dynamic_plot(void); //动态曲线绘制
// void menu_test4_reset(void); //menu_test4复位
// typedef struct //主界面显示数据结构体
// {
// char sig_runtime[8];
// char sig_data_io[7];
// }SCR_MAIN;
/**********test4**********/
/**********test5**********/
void menu_test5(void); //模拟正式产品,实现基本功能
void menu_data_init(void); //数据初始化
void scr_init_run(void); //开机动画
void scr_main_run(void); //主界面
void scr_setting_run(void); //详细设置界面
void runtime_show(void); //运行时间显示
void battery_show(void); //电池电量显示
void key_functions_main(void); //按键功能,主界面
void current_io(void); //当前输入&输出
typedef struct
{
//general
uint8_t scr_now; //当前屏幕,通过按键切换, [0->init, 1->main, 2->setting]
int tick_prv; //前一个时刻
int tick_cur; //当前时刻
//screen_init
uint8_t scr_init_flag; //初始界面标志,是否播放过开机动画
uint8_t scr_init_bar; //进度条实时值
uint8_t scr_init_cnt; //进度条计数
//screen_main
uint8_t runtime_seconds;
uint8_t runtime_minutes;
uint8_t runtime_hours;
char runtime_show[8];
uint8_t battery_cnt;
uint8_t io_cursor; //光标位置, [000,000], 0~5整数表示6个位置
char io_numbers[6]; //实时显示的字符
// uint16_t io_number_L; //小数点左三位
// uint16_t io_number_R; //小数点右三位
//screen_setting
}MENU_DATA;
/**********test5**********/
#endif