曲线绘制,间隔1500ms绘制下一个数据点
This commit is contained in:
parent
34fddfbc9d
commit
5431f6d9ab
|
@ -2,7 +2,7 @@
|
|||
* @Author: wujunchao wujunchao@wuxismart.com
|
||||
* @Date: 2024-12-27 11:51:06
|
||||
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
||||
* @LastEditTime: 2025-02-05 14:33:58
|
||||
* @LastEditTime: 2025-02-06 14:13:18
|
||||
* @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
|
||||
*/
|
||||
|
@ -121,6 +121,7 @@ void battery_show(void); //电池电量显示
|
|||
void key_functions_main(void); //按键功能,主界面
|
||||
void key_functions_setting(void); //按键功能,详细设置菜单界面
|
||||
void num_twinkle(void); //数值闪烁,数值发生变化后开始闪烁,10秒无动作后闪烁停止,游标移动后恢复前一时刻位置的数值
|
||||
void plot_drawing(void); //实时曲线绘制
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -176,6 +177,31 @@ typedef struct
|
|||
//screen_setting
|
||||
|
||||
}MENU_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
//lv_chart_set_range(ui->screen_main_chart_1, LV_CHART_AXIS_PRIMARY_Y, y_pri_low, y_pri_up);
|
||||
int y_pri_up; //纵轴(主)上限
|
||||
int y_pri_low; //纵轴(主)下限
|
||||
float32 yreal_pri_up; //实际值y上限
|
||||
float32 yreal_pri_low; //实际值y下限
|
||||
|
||||
//lv_chart_set_range(ui->screen_main_chart_1, LV_CHART_AXIS_SECONDARY_Y, y_scd_low, y_scd_up);
|
||||
int y_scd_up; //纵轴(副)上限
|
||||
int y_scd_low; //纵轴(副)下限
|
||||
float32 yreal_scd_up; //实际值y上限
|
||||
float32 yreal_scd_low; //实际值y下限
|
||||
|
||||
//lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 1);
|
||||
int y_pri_value; //0号曲线的下一个点,主y轴
|
||||
float32 yreal_pri_value; //0号曲线的下一个实际值
|
||||
|
||||
//lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_1, 1);
|
||||
int y_scd_value; //1号曲线的下一个点,副y轴
|
||||
float32 yreal_scd_value; //1号曲线的下一个实际值
|
||||
|
||||
}PLOT_DATA;
|
||||
|
||||
/**********test5**********/
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: wujunchao wujunchao@wuxismart.com
|
||||
* @Date: 2024-12-27 11:50:56
|
||||
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
||||
* @LastEditTime: 2025-02-05 16:53:58
|
||||
* @LastEditTime: 2025-02-06 14:38:05
|
||||
* @FilePath: \signal_generator\App\APP_WU\Src\apps_gather.c
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@
|
|||
#if 1
|
||||
/**********test5**********/
|
||||
MENU_DATA m5data;
|
||||
PLOT_DATA pltdata;
|
||||
// char buff_io[2];
|
||||
void menu_data_init(void)
|
||||
{
|
||||
|
@ -26,6 +27,7 @@ void menu_data_init(void)
|
|||
m5data.scr_init_cnt = 0;
|
||||
|
||||
//screen_main
|
||||
{
|
||||
m5data.runtime_seconds = 0;
|
||||
m5data.runtime_minutes = 0;
|
||||
m5data.runtime_hours = 0;
|
||||
|
@ -43,8 +45,26 @@ void menu_data_init(void)
|
|||
m5data.input_mode_type = VOLTAGE_MV;
|
||||
m5data.output_mode = SIG_VOLTAGE;
|
||||
m5data.output_mode_type = VOLTAGE_MV;
|
||||
// memset(buff_io,0,2); //用于lvgl文本显示
|
||||
|
||||
//图标显示值(int)
|
||||
pltdata.y_pri_low = 0;
|
||||
pltdata.y_pri_up = 100;
|
||||
pltdata.y_scd_low = 0;
|
||||
pltdata.y_scd_up = 100;
|
||||
pltdata.y_pri_value = 0;
|
||||
pltdata.y_scd_value = 0;
|
||||
|
||||
//实际物理量(float32)
|
||||
pltdata.yreal_pri_low = 4;
|
||||
pltdata.yreal_pri_up = 20;
|
||||
pltdata.yreal_scd_low = 4;
|
||||
pltdata.yreal_scd_up = 20;
|
||||
pltdata.yreal_pri_value = 0;
|
||||
pltdata.yreal_scd_value = 0;
|
||||
}
|
||||
|
||||
|
||||
// memset(buff_io,0,2);
|
||||
|
||||
//screen_setting
|
||||
}
|
||||
|
@ -739,6 +759,7 @@ void scr_main_run(void) //主界面
|
|||
battery_show();
|
||||
|
||||
//动态曲线绘制
|
||||
plot_drawing();
|
||||
|
||||
//当前输出值、工作模式、IN/OUT、ON/OFF、当前工作模式的单位或类型。该部分内容已迁移至按键功能,按键按下后再对显示内容进行设置
|
||||
//数值闪烁
|
||||
|
@ -1002,6 +1023,22 @@ void num_twinkle(void) //数值闪烁
|
|||
|
||||
}
|
||||
|
||||
void plot_drawing(void) //实时曲线绘制
|
||||
{
|
||||
if(plot_1500ms_flag)
|
||||
{
|
||||
plot_1500ms_flag = 0;
|
||||
|
||||
pltdata.yreal_pri_value = m5data.io_numbers[0]*100 + m5data.io_numbers[1]*10 + m5data.io_numbers[2] + \
|
||||
m5data.io_numbers[3]*(float32)0.1 + m5data.io_numbers[4]*(float32)0.01 + m5data.io_numbers[5]*(float32)0.001;
|
||||
|
||||
pltdata.y_pri_value = ( pltdata.y_pri_up - pltdata.y_pri_low ) * \
|
||||
( pltdata.yreal_pri_value - pltdata.yreal_pri_low ) / ( pltdata.yreal_pri_up - pltdata.yreal_pri_low );
|
||||
|
||||
lv_chart_set_next_value(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, pltdata.y_pri_value);
|
||||
}
|
||||
}
|
||||
|
||||
void scr_setting_run(void) //详细设置界面
|
||||
{
|
||||
|
||||
|
|
62955
MDK-ARM/JLinkLog.txt
62955
MDK-ARM/JLinkLog.txt
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue