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
b7ced6a1
Commit
b7ced6a1
authored
May 26, 2025
by
王佳伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改按键
parent
4f21b111
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
370 additions
and
206 deletions
+370
-206
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+30
-2
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+340
-204
No files found.
YueJin_test_bench/source/Appliciation/Key.h
View file @
b7ced6a1
...
@@ -3,16 +3,22 @@
...
@@ -3,16 +3,22 @@
#include "TYW_stdint.h"
#include "TYW_stdint.h"
#define Check_KeepTime 1000 //每个步骤保持时间
#define Check_Couont 11 //多少个步骤
typedef
enum
typedef
enum
{
{
KEY_1
,
KEY_2
,
KEY_3
,
KEY_4
,
KEY_5
,
KEY_5
,
KEY_6
,
KEY_6
,
KEY_7
,
KEY_7
,
KEY_8
,
KEY_8
,
KEY_9
,
KEY_9
,
KEY_10
,
KEY_10
,
KEY_11
,
KEY_3
,
KEY_NUM_MAX
,
KEY_NUM_MAX
,
}
Key_Num_en_t
;
}
Key_Num_en_t
;
...
@@ -79,5 +85,27 @@ extern void Key_Service(void); /*10ms*/
...
@@ -79,5 +85,27 @@ extern void Key_Service(void); /*10ms*/
extern
Key_Set_en_t
Key_Parameter_Set_Short_Press_Time
(
uint16_t
u16Time
);
extern
Key_Set_en_t
Key_Parameter_Set_Short_Press_Time
(
uint16_t
u16Time
);
extern
Key_Set_en_t
Key_Parameter_Set_Long_Press_Time
(
uint16_t
u16Time
);
extern
Key_Set_en_t
Key_Parameter_Set_Long_Press_Time
(
uint16_t
u16Time
);
extern
Key_Set_en_t
Key_Parameter_Set_Super_Long_Press_Time
(
uint32_t
u32Time
);
extern
Key_Set_en_t
Key_Parameter_Set_Super_Long_Press_Time
(
uint32_t
u32Time
);
extern
uint8_t
Check_Steps
;
extern
void
User_CheckMode_Service
(
uint8_t
CbkCycle
);
extern
uint8_t
Vspeed
;
extern
uint8_t
Signal_4G
;
extern
uint8_t
Signal_GPS
;
extern
uint16_t
Eletricity
;
extern
uint8_t
Hour
;
extern
uint8_t
Tcs
;
extern
uint8_t
Energy_recovery
;
extern
uint8_t
Gear
;
extern
uint8_t
Ready
;
extern
uint8_t
Cruiste
;
extern
uint8_t
Fault
;
extern
uint8_t
Motor_hert
;
extern
uint8_t
Battery_temp
;
#endif
#endif
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
b7ced6a1
...
@@ -5,56 +5,52 @@
...
@@ -5,56 +5,52 @@
#include "Barcode_Scanner.h"
#include "Barcode_Scanner.h"
#include "Task.h"
#include "Task.h"
#include "string.h"
#include "string.h"
void
Key_Operation_SW5
(
Key_Event_en_t
enKeyEvent
)
uint8_t
Check_Steps
=
0
;
uint8_t
Check_Control_Mode
=
2
;
// 1 自走模式 2 打点模式 0 默认都发0
uint8_t
Check_Control_Time
=
0
;
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
{
{
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// Display_Add( );
// Display_TFT_Clear( );
// }
if
(
firstpowerflag
==
2
)
{
MENU_CHECK_STEP_ADD
(
);
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
if
(
firstpowerflag
==
2
)
{
if
(
AutoFlag
==
1
)
{
AutoFlag
=
0
;
}
else
{
AutoFlag
=
1
;
}
}
}
}
// else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
// {
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
}
// {
else
// ;
{
// }
}
// else
}
// {
void
Key_Operation_SW2
(
Key_Event_en_t
enKeyEvent
)
// Display_Add( );
{
// Display_TFT_Clear( );
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
// }
{
}
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
)
{
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
}
else
else
{
{
}
}
...
@@ -63,19 +59,6 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
...
@@ -63,19 +59,6 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// Display_Sub( );
// Display_TFT_Clear( );
// }
if
(
firstpowerflag
==
2
)
{
MENU_CHECK_STEP_SUB
();
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -83,74 +66,42 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
...
@@ -83,74 +66,42 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
{
if
(
(
LED_Waring
==
1
)
||
(
UDS_Warning_Voltage
==
1
))
{
;
}
else
{
Display_Sub
(
);
Display_TFT_Clear
(
);
}
}
}
else
else
{
{
}
}
}
}
void
Key_Operation_SW
7
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW
5
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
if
(
firstpowerflag
==
2
)
{
if
(
zhenduanflag
!=
2
&&
zhenduanflag
!=
3
)
{
zhenduanflag
=
2
;
}
else
{
zhenduanflag
=
0
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
else
{
}
}
void
Key_Operation_SW6
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
else
else
{
{
}
}
}
}
void
Key_Operation_SW
8
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW
7
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
if
(
firstpowerflag
==
2
)
{
if
(
zhenduanflag
!=
1
)
{
zhenduanflag
=
1
;
}
else
{
zhenduanflag
=
0
;
// LINE_OUT_NEG_01 = 1;
// LINE_OUT_NEG_02 = 1;
// LINE_OUT_NEG_03 = 1;
// LINE_OUT_NEG_04 = 1;
zhenduansendStep
=
0
;
// memset(barcode_Msg,0,sizeof(barcode_Msg));
}
RS485_TX_finish
=
0
;
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -162,24 +113,12 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
...
@@ -162,24 +113,12 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
void
Key_Operation_SW2
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW8
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
if
(
firstpowerflag
==
2
)
{
if
(
LINE_OUT_NEG_01
==
1U
)
{
LINE_OUT_NEG_01
=
0U
;
Auto_ONOFF
=
3
;
}
else
{
LINE_OUT_NEG_01
=
1U
;
Auto_ONOFF
==
0
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -191,87 +130,92 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
...
@@ -191,87 +130,92 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW9
(
Key_Event_en_t
enKeyEvent
)
{
{
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
// if(Get_Display_Type( ) == 2)
if
(
Check_Control_Mode
==
1
)
// {
// MENU_CHECK_STEP_SUB( );
// }
if
(
firstpowerflag
==
2
)
{
{
if
(
clearOdoFlag
==
0
)
Check_Control_Mode
=
2
;
{
clearOdoFlag
=
1
;
}
else
{
clearOdoFlag
=
0
;
}
queren
=
0
;
}
}
else
if
(
Check_Control_Mode
==
2
)
{
Check_Control_Mode
=
1
;
}
else
{
Check_Control_Mode
=
2
;
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
{
if
(
Get_Display_Type
(
)
==
2
)
{
MENU_CHECK_STEP_SUB
(
);
}
}
}
else
else
{
{
}
}
}
}
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW10
(
Key_Event_en_t
enKeyEvent
)
{
{
/*清零ODO*/
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
if
(
firstpowerflag
==
2
)
if
(
Check_Control_Mode
==
2
)
{
{
if
(
Auto_ONOFF
!=
0
)
Check_Steps
++
;
{
if
(
Check_Steps
>
Check_Couont
)
Auto_ONOFF
=
0
;
}
else
{
{
Auto_ONOFF
=
1
;
Check_Steps
=
0
;
}
}
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
{
if
(
Get_Display_Type
(
)
==
2
)
{
MENU_CHECK_STEP_ADD
(
);
}
}
}
else
else
{
{
}
}
}
}
/*-------------------------------------------------*/
/*-------------------------------------------------*/
Key_Real_Status_en_t
Key_Real_sw
5
(
void
)
Key_Real_Status_en_t
Key_Real_sw
1
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW5
==
0U
)
if
(
SW1
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
else
return
enKeyRealStatus
;
}
Key_Real_Status_en_t
Key_Real_sw2
(
void
)
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW2
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
return
enKeyRealStatus
;
}
Key_Real_Status_en_t
Key_Real_sw3
(
void
)
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW3
==
0U
)
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
...
@@ -286,12 +230,11 @@ Key_Real_Status_en_t Key_Real_sw4(void)
...
@@ -286,12 +230,11 @@ Key_Real_Status_en_t Key_Real_sw4(void)
}
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw
7
(
void
)
Key_Real_Status_en_t
Key_Real_sw
5
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW5
==
0U
)
if
(
SW7
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
...
@@ -301,52 +244,57 @@ Key_Real_Status_en_t Key_Real_sw7(void)
...
@@ -301,52 +244,57 @@ Key_Real_Status_en_t Key_Real_sw7(void)
}
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw
8
(
void
)
Key_Real_Status_en_t
Key_Real_sw
6
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW6
==
0U
)
if
(
SW8
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
else
{
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw
2
(
void
)
Key_Real_Status_en_t
Key_Real_sw
7
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW
2
==
0U
)
if
(
SW
7
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
else
{
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw
1
(
void
)
Key_Real_Status_en_t
Key_Real_sw
8
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW
1
==
0U
)
if
(
SW
8
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw9
(
void
)
Key_Real_Status_en_t
Key_Real_sw3
(
void
)
{
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW
3
==
0U
)
if
(
SW
9
==
0U
)
{
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
}
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw10
(
void
)
Key_Real_Status_en_t
Key_Real_sw10
(
void
)
{
{
...
@@ -359,54 +307,242 @@ Key_Real_Status_en_t Key_Real_sw10(void)
...
@@ -359,54 +307,242 @@ Key_Real_Status_en_t Key_Real_sw10(void)
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
void
Key_Operation_SW10
(
Key_Event_en_t
enKeyEvent
)
void
User_CheckMode_Service
(
uint8_t
CbkCycle
)
{
{
/*清零ODO*/
if
(
Check_Control_Mode
==
2
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
Check_Control_Time
+=
CbkCycle
;
if
(
firstpowerflag
==
2
)
if
(
Check_Control_Time
>
Check_KeepTime
)
{
{
Display_TFT_Clear
();
Check_Control_Time
=
0
;
if
(
connectbleFlag
==
0
)
Check_Steps
++
;
{
}
connectbleFlag
=
1
;
if
(
Check_Steps
>
Check_Couont
)
name1
=
(
devicename
)
&
0xFF
;
{
name2
=
(
devicename
>>
8
)
&
0xFF
;
Check_Steps
=
0
;
}
else
{
name1
=
(
devicename
)
&
0xFF
;
name2
=
(
devicename
>>
8
)
&
0xFF
;
startONfalg
=
0
;
send0x42time
=
0
;
bleOFFtoONtime
=
0
;
startONfalg
=
0
;
startIGONtime
=
0
;
recvflag111
=
0
;
}
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
}
{
uint8_t
Vspeed
=
0
;
}
uint8_t
Signal_4G
=
0
;
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
uint8_t
Signal_GPS
=
0
;
{
uint16_t
Eletricity
=
0
;
connectbleFlag
=
0
;
uint8_t
Hour
=
0
;
}
uint8_t
Tcs
=
0
;
else
uint8_t
Energy_recovery
=
0
;
{
uint8_t
Gear
=
0
;
uint8_t
Ready
=
0
;
uint8_t
Cruiste
=
0
;
uint8_t
Fault
=
0
;
uint8_t
Motor_hert
=
0
;
uint8_t
Battery_temp
=
0
;
void
User_CanSend
(
void
)
{
switch
(
Check_Steps
)
{
case
0
:
Vspeed
=
0
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
0
;
Hour
=
0
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
1
:
Vspeed
=
10
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
0
;
Hour
=
2
;
Tcs
=
1
;
Energy_recovery
=
0
;
Gear
=
1
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
2
:
Vspeed
=
19
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
15
;
Hour
=
4
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
3
:
Vspeed
=
29
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
35
;
Hour
=
6
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
2
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
1
;
break
;
case
4
:
Vspeed
=
38
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
55
;
Hour
=
8
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
5
:
Vspeed
=
47
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
75
;
Hour
=
10
;
Tcs
=
0
;
Energy_recovery
=
2
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
6
:
Vspeed
=
57
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
100
;
Hour
=
12
;
Tcs
=
2
;
Energy_recovery
=
1
;
Gear
=
0
;
Ready
=
1
;
Cruiste
=
1
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
7
:
Vspeed
=
75
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
75
;
Hour
=
14
;
Tcs
=
0
;
Energy_recovery
=
3
;
Gear
=
0
;
Ready
=
3
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
8
:
Vspeed
=
88
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
55
;
Hour
=
16
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
2
;
Cruiste
=
0
;
Fault
=
1
;
Motor_hert
=
1
;
Battery_temp
=
0
;
break
;
case
9
:
Vspeed
=
88
;
Signal_4G
=
0
;
Signal_GPS
=
65
;
Eletricity
=
35
;
Hour
=
18
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
10
:
Vspeed
=
88
;
Signal_4G
=
65
;
Signal_GPS
=
0
;
Eletricity
=
15
;
Hour
=
20
;
Tcs
=
0
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
case
11
:
Vspeed
=
88
;
Signal_4G
=
0
;
Signal_GPS
=
0
;
Eletricity
=
100
;
Hour
=
0
;
Tcs
=
1
;
Energy_recovery
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
Fault
=
0
;
Motor_hert
=
0
;
Battery_temp
=
0
;
break
;
}
}
}
}
/*---------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------*/
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
]
=
{
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
]
=
{
{
KEY_TYPE_LINE
,
Key_Real_sw5
,
Key_Operation_SW5
},
//SW5
{
KEY_TYPE_LINE
,
Key_Real_sw1
,
Key_Operation_SW1
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw2
,
Key_Operation_SW2
},
//SW2-
{
KEY_TYPE_LINE
,
Key_Real_sw3
,
Key_Operation_SW3
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw4
,
Key_Operation_SW4
},
//SW4
{
KEY_TYPE_LINE
,
Key_Real_sw4
,
Key_Operation_SW4
},
//SW4
{
KEY_TYPE_LINE
,
Key_Real_sw5
,
Key_Operation_SW5
},
//SW5
{
KEY_TYPE_LINE
,
Key_Real_sw6
,
Key_Operation_SW6
},
//SW5
{
KEY_TYPE_LINE
,
Key_Real_sw7
,
Key_Operation_SW7
},
{
KEY_TYPE_LINE
,
Key_Real_sw7
,
Key_Operation_SW7
},
{
KEY_TYPE_LINE
,
Key_Real_sw8
,
Key_Operation_SW8
},
{
KEY_TYPE_LINE
,
Key_Real_sw8
,
Key_Operation_SW8
},
{
KEY_TYPE_LINE
,
Key_Real_sw2
,
Key_Operation_SW2
},
//SW2-
{
KEY_TYPE_LINE
,
Key_Real_sw9
,
Key_Operation_SW9
},
{
KEY_TYPE_LINE
,
Key_Real_sw1
,
Key_Operation_SW1
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw10
,
Key_Operation_SW10
},
{
KEY_TYPE_LINE
,
Key_Real_sw10
,
Key_Operation_SW10
},
{
KEY_TYPE_LINE
,
Key_Real_sw3
,
Key_Operation_SW3
},
//SW1+
};
};
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