Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈家乐
jiancetai
Commits
8888a6dc
Commit
8888a6dc
authored
Dec 09, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加轮速报警与震动报警
parent
a619d626
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
46 deletions
+83
-46
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+44
-10
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+3
-1
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+34
-33
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+1
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+1
-1
No files found.
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
8888a6dc
...
...
@@ -1600,7 +1600,7 @@ const unsigned char gImage_Alarm_06_Word0X51_Y261[]={/*Byte Size422*/
0X07U
,
0X03U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X02U
,
0X07U
,
0X07U
,
0X03U
,
0X01U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X07U
,
0X07U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,};
//震动报警
const
unsigned
char
gImage_Alarm_09_Word0X51_Y261
[]
=
{
/*Byte Size422*/
140U
,
24U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X78U
,
0X7eU
,
0XffU
,
0XffU
,
0XffU
,
0XffU
,
...
...
@@ -1630,7 +1630,7 @@ const unsigned char gImage_Alarm_06_Word0X51_Y261[]={/*Byte Size422*/
0X03U
,
0X03U
,
0X03U
,
0X03U
,
0X03U
,
0X00U
,
0X00U
,
0X00U
,
0X03U
,
0X03U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X07U
,
0X07U
,
0X00U
,
0X03U
,
0X03U
,
0X03U
,
0X03U
,
0X03U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,};
//轮动报警
const
unsigned
char
gImage_Alarm_10_Word0X51_Y261
[]
=
{
/*Byte Size422*/
140U
,
24U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X0cU
,
0XccU
,
0XfcU
,
0XffU
,
0XffU
,
0XecU
,
...
...
@@ -4582,13 +4582,7 @@ void ONE_KEY_Display(void)
ONEKEYLongTime
=
0
;
}
}
else
{
ONE_KEY
=
1
;
ONEKEYLongTime
=
0
;
}
if
(
ONEKEYFlag
==
2
)
else
if
(
ONEKEYFlag
==
2
)
{
ONEKEYDoubleclickTime
++
;
if
(
ONEKEYDoubleclickTime
<=
4
)
...
...
@@ -4613,6 +4607,7 @@ void ONE_KEY_Display(void)
else
{
ONE_KEY
=
1
;
ONEKEYLongTime
=
0
;
ONEKEYDoubleclickTime
=
0
;
}
...
...
@@ -4631,6 +4626,45 @@ void ONE_KEY_Display(void)
if
(
ZTSVOK_A
&&
ZTSVOK_B
)
{
TFT_LCD_Draw_Bmp
(
51
,
261
,(
uint8_t
*
)
gImage_Alarm_08_Word0X51_Y261
);
TFT_LCD_Draw_Bmp
(
5
,
50
,(
uint8_t
*
)
gImage_Alarm_08_Word0X51_Y261
);
}
}
uint8_t
RotationAlarmFlag
;
uint8_t
RotationAlarmMode
;
uint8_t
VibrationAlarmFlag
;
void
RotationAlarm
(
void
)
{
if
(
RotationAlarmMode
==
1
)
//轮速报警模式
{
if
(
DISIN
)
{
if
(
RotationAlarmFlag
==
1
)
{
RotationAlarmFlag
=
0
;
Display_TFT_Clear
();
}
}
else
{
RotationAlarmFlag
=
1
;
TFT_LCD_Draw_Bmp
(
5
,
25
,(
uint8_t
*
)
gImage_Alarm_10_Word0X51_Y261
);
}
}
else
//震动报警模式
{
if
(
DISIN
)
{
if
(
VibrationAlarmFlag
==
1
)
{
VibrationAlarmFlag
=
0
;
Display_TFT_Clear
();
}
}
else
{
VibrationAlarmFlag
=
1
;
TFT_LCD_Draw_Bmp
(
5
,
25
,(
uint8_t
*
)
gImage_Alarm_09_Word0X51_Y261
);
}
}
}
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
8888a6dc
...
...
@@ -51,6 +51,8 @@ extern unsigned int Display_Menu_Type;
extern
uint32_t
odo_val_Back
;
extern
uint8_t
ZTSVOK_A
;
extern
uint8_t
ZTSVOK_B
;
extern
uint8_t
RotationAlarmFlag
;
extern
uint8_t
RotationAlarmMode
;
void
GeneralInfoDisp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
void
Display_Title_Info
(
void
);
void
Display_Version_Info
(
uint32_t
ON_OFF
);
...
...
@@ -80,7 +82,7 @@ void Buzzer_Stop(void);
extern
void
Buzzer_Init
(
void
);
extern
void
Buzzer_Warning
(
void
);
extern
void
ONE_KEY_Display
(
void
);
extern
void
RotationAlarm
(
void
);
void
GUI_General_Digit_Display
(
uint32_t
Digit
,
const
uint8_t
*
Font
[],
uint8_t
Len
,
uint8_t
Blank
,
const
uint16_t
*
px
,
uint16_t
y
);
void
GUI_Display_Version_Code_Service
(
uint8_t
StarX
,
uint16_t
PosY
,
uint8_t
*
Str
,
const
uint8_t
*
Version
[]
,
uint8_t
SpaceKeySize
);
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
8888a6dc
...
...
@@ -5,19 +5,26 @@
#include "Barcode_Scanner.h"
#include "Task.h"
#include "string.h"
//ABC输出
void
Key_Operation_SW5
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
MENU_CHECK_STEP_ADD
(
);
CHECK_Ctrl_delay
=
0
;
CHECK_Value
=
0
;
}
RotationAlarmFlag
=
0
;
if
(
ABC_OUT
==
1
)
{
RotationAlarmMode
=
1
;
ABC_OUT
=
0
;
}
else
{
RotationAlarmMode
=
0
;
ABC_OUT
=
1
;
}
}
}
//一键启动按键测试
void
Key_Operation_SW4
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
...
...
@@ -32,22 +39,13 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage == 1))
// {
// ;
// }
// else
// {
// Display_Sub( );
// Display_TFT_Clear( );
// }
}
else
{
}
}
void
Key_Operation_SW7
(
Key_Event_en_t
enKeyEvent
)
//上下ACC电
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
...
...
@@ -94,24 +92,27 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
}
}
void
Key_Operation_SW2
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW2
(
Key_Event_en_t
enKeyEvent
)
//下一步
{
//
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
//
{
// if(MENU_CHECK_STEP == 0)
// {
// if(left_turn == 0
)
//
{
// left_turn = 1;
//
}
// else
//
{
// left_turn = 0;
//
}
// }
// }
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
MENU_CHECK_STEP_ADD
(
);
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
}
else
{
}
}
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
8888a6dc
...
...
@@ -36,7 +36,7 @@
#define ZXSW_AD GPIO_IN_APORT00_PIN08
#define DCF_Close GPIO_IN_APORT00_PIN09 //电磁阀关
#define DIS_AD GPIO_IN_APORT00_PIN10
#define
Light_control_headlights GPIO_IN_APORT00_PIN11 //光控大灯
#define
DISIN GPIO_IN_APORT00_PIN11 //DIS输入
#define TX_OUT GPIO_OUT_PORT00_PIN08 //一线通TX输出
#define ZTS_A GPIO_IN_APORT00_PIN14 //坐桶锁
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
8888a6dc
...
...
@@ -337,7 +337,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
// }
Display_PageNum
();
ONE_KEY_Display
();
RotationAlarm
();
if
(
CHECK_Ctrl_delay
<
200
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment