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
6e83c34b
Commit
6e83c34b
authored
Sep 24, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:老化架程序
parent
442385e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
184 deletions
+209
-184
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+120
-83
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+37
-43
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+1
-1
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+51
-57
No files found.
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
6e83c34b
...
...
@@ -628,7 +628,7 @@ uint8_t delaytime = 0;
uint8_t
delayresult
=
0
;
uint8_t
TimeDelay_3s
(
void
)
{
if
(
MENU_CHECK_STEP
==
14
)
//光感步骤
if
(
MENU_CHECK_STEP
==
7
)
//光感步骤
{
if
(
delaytime
<=
30
)
{
...
...
@@ -731,7 +731,7 @@ void Function_Check_Ctrl(uint32_t cmd)
RightturnSignal
=
0
;
LeftturnSignal
=
0
;
Bluetoothlight
=
0
;
Bluetoothlight
=
1
;
Positionlight
=
0
;
highbeam
=
0
;
Lowbeam
=
0
;
...
...
@@ -806,6 +806,41 @@ void Function_Check_Ctrl(uint32_t cmd)
}
case
7
:
{
//密码认证
if
(
KeyStep
==
3
)
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
else
{
if
(
TimeDelay_3s
()
==
0
)
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_04
=
0
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
else
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
}
RightturnSignal
=
0
;
LeftturnSignal
=
0
;
Bluetoothlight
=
0
;
...
...
@@ -814,25 +849,25 @@ void Function_Check_Ctrl(uint32_t cmd)
Lowbeam
=
0
;
break
;
}
// case 8:
// {
// if(Auto_ONOFF == 0)
// {
// LINE_OUT_NEG_01 = 1;
// LINE_OUT_NEG_04 = 1;
// }
// LINE_OUT_NEG_02 = 1;
// LINE_OUT_NEG_03 = 1;
// RightturnSignal = 0;
// LeftturnSignal = 0;
// Bluetoothlight = 0;
// Positionlight = 0;
// highbeam = 0;
// Lowbeam = 0;
// break;
// }
case
8
:
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
RightturnSignal
=
0
;
LeftturnSignal
=
0
;
Bluetoothlight
=
0
;
Positionlight
=
0
;
highbeam
=
0
;
Lowbeam
=
0
;
break
;
}
case
9
:
{
// LED3 = 0;
// LINE_OUT_NEG_05 = 1;
...
...
@@ -847,7 +882,7 @@ void Function_Check_Ctrl(uint32_t cmd)
Bluetoothlight
=
0
;
break
;
}
case
9
:
case
10
:
{
// LED3 = 1;
// LED4 = 1;
...
...
@@ -862,7 +897,7 @@ void Function_Check_Ctrl(uint32_t cmd)
Bluetoothlight
=
0
;
break
;
}
case
1
0
:
case
1
1
:
{
// if(Auto_ONOFF == 0)
// {
...
...
@@ -885,7 +920,7 @@ void Function_Check_Ctrl(uint32_t cmd)
Bluetoothlight
=
0
;
break
;
}
case
1
1
:
//下电蓝牙外屏
case
1
2
:
//下电蓝牙外屏
{
// POWER_CTRL_KL30_Current = 1;
// if(Auto_ONOFF == 0)
...
...
@@ -903,7 +938,7 @@ void Function_Check_Ctrl(uint32_t cmd)
Bluetoothlight
=
0
;
break
;
}
case
1
2
:
case
1
3
:
//下电剩30测静态电流
{
Lowbeam
=
0
;
LeftturnSignal
=
0
;
...
...
@@ -912,16 +947,8 @@ void Function_Check_Ctrl(uint32_t cmd)
Bluetoothlight
=
0
;
break
;
}
case
1
3
:
case
1
4
:
//密码开机
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
RightturnSignal
=
1
;
LeftturnSignal
=
1
;
Bluetoothlight
=
1
;
...
...
@@ -930,64 +957,74 @@ void Function_Check_Ctrl(uint32_t cmd)
Lowbeam
=
1
;
break
;
}
case
1
4
:
case
1
5
:
{
//密码认证
if
(
KeyStep
==
3
)
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
else
{
if
(
TimeDelay_3s
()
==
0
)
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_04
=
0
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
else
{
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
}
}
Lowbeam
=
0
;
LeftturnSignal
=
0
;
highbeam
=
0
;
RightturnSignal
=
0
;
Bluetoothlight
=
1
;
Bluetoothlight
=
0
;
break
;
}
// case 15: //全上电连蓝牙
// {
// LINE_OUT_NEG_05 = 0;
// if(Auto_ONOFF == 0)
// {
// LINE_OUT_NEG_01 = 1;
// LINE_OUT_NEG_04 = 1;
// }
// LINE_OUT_NEG_02 = 1;
// LINE_OUT_NEG_03 = 1;
// break;
// }
case
16
:
//全上电连蓝牙
{
LINE_OUT_NEG_05
=
0
;
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
break
;
}
// case 21:
// {
// LINE_OUT_POS_01 = 1;
// LINE_OUT_NEG_02 = 0;
// LINE_OUT_NEG_01 = 0;
// break;
// }
// case 22:
// {
// LINE_OUT_POS_01 = 1;
// LINE_OUT_NEG_02 = 1;
// LINE_OUT_NEG_01 = 1;
// Display_Menu_Type = 3;
// if( (Get_ID_HandBrakeSts() != 1) ||
// (Get_CAN_CH0_ID_10FF4117_Sig_Seatbeltsts() != 1) ||
// (Get_CAN_CH0_ID_10FF1017_Sig_HighBeamSts() != 1) ||
// (Get_CAN_CH0_ID_10FF1017_Sig_LowBeamSts() != 1) || (Get_CAN_CH0_ID_10FF1017_Sig_FrontFogLightSts() != 1) )
// {
// LED_Waring = 1;
// }
// else
// {
// LED_Waring = 0;
// }
// break;
// }
// case 23:
// {
// LINE_OUT_POS_01 = 0;
// LINE_OUT_NEG_02 = 0;
// LINE_OUT_NEG_01 = 0;
// break;
// }
default:
break
;
break
;
// }
}
}
}
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
6e83c34b
...
...
@@ -4094,7 +4094,7 @@ void Display_Version_Info(uint32_t ON_OFF)
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp
(
3
,
290
,
(
uint8_t
*
)
gImage_gImage_checkVX6_Y165
);
//检测台版本号
uint8_t
mbuff
[
7
]
=
{
2
,
5
,
0
,
9
,
2
,
3
,
0xff
};
uint8_t
mbuff
[
7
]
=
{
2
,
5
,
0
,
9
,
1
,
8
,
0xff
};
General_Number_Disp
(
mbuff
,
160
,
290
);
}
...
...
@@ -4628,11 +4628,11 @@ void Display_Send_Vspead(uint8_t menu)
GUI_Display_Version_Code_Service
(
3
,
40
+
25
+
25
+
25
+
25
,
"Color"
,
Letter_Num_11
,
PCodeText_Space_size
);
//
TFT_LCD_Draw_Bmp(3, 40+25+25+25+25+25+25, ( uint8_t * )gImage_icon_01X0_Y12);
TFT_LCD_Draw_Bmp
(
3
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y04
);
TFT_LCD_Draw_Bmp
(
3
+
6
0
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y10
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
6
0
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y18
);
//
TFT_LCD_Draw_Bmp(3+40+40+40+55, 40+25+25+25+25+25+25, ( uint8_t * )gImage_icon_01X0_Y13);
TFT_LCD_Draw_Bmp
(
3
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y12
);
TFT_LCD_Draw_Bmp
(
3
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y04
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
4
0
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y10
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
40
+
4
0
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y18
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
40
+
40
+
55
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y13
);
TFT_LCD_Draw_Bmp
(
3
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
40
,
(
uint8_t
*
)
gImage_icon_01X0_Y06
);
TFT_LCD_Draw_Bmp
(
3
+
60
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
40
,
(
uint8_t
*
)
gImage_icon_01X0_Y03
);
...
...
@@ -4684,9 +4684,6 @@ void Display_Send_Vspead(uint8_t menu)
TFT_LCD_Draw_Bmp
(
3
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y05
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_icon_01X0_Y08
);
TFT_LCD_Draw_Bmp
(
3
+
40
+
40
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_gImage_TCS1X6_Y16
);
TFT_LCD_Draw_Bmp
(
3
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
40
,
(
uint8_t
*
)
gImage_icon_01X0_Y12
);
TFT_LCD_Draw_Bmp
(
3
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
40
,
(
uint8_t
*
)
gImage_icon_01X0_Y13
);
// TFT_LCD_Draw_Bmp(3+40+40+40, 40+25+25+25+25+25+25, ( uint8_t * )gImage_icon_01X0_Y18);
// TFT_LCD_Draw_Bmp(3+40+40+40+55, 40+25+25+25+25+25+25, ( uint8_t * )gImage_icon_01X0_Y13);
...
...
@@ -4816,9 +4813,12 @@ void Display_Send_Vspead(uint8_t menu)
General_Number_Disp
(
AUTO
,
3
+
40
,
40
+
25
+
25
+
25
+
25
+
25
+
25
);
break
;
case
7
:
// else
// {
if
(
KeyStep
!=
3
)
{
GUI_Display_Version_Code_Service
(
25
,
20
,
"Please enter password "
,
Letter_Num_11
,
PCodeText_Space_size
);
}
else
{
// Display_TFT_Clear();
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_ABSX6_Y165);
TFT_LCD_Draw_Bmp
(
70
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
gImage_gImage_xiangonglv1X6_Y16
);
...
...
@@ -4847,26 +4847,26 @@ void Display_Send_Vspead(uint8_t menu)
// TFT_LCD_Draw_Bmp(140+18+27, 40+25+25+25+25+25, ( uint8_t * )NO_DIAN);
// TFT_LCD_Draw_Bmp(140+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_0);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_6);
//
}
}
break
;
//
case 8:
case
8
:
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_bluetoothX6_Y165);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_zcguzhang1X6_Y16);
// GUI_Display_Version_Code_Service(160, 40+25, "77", Letter_Num_11, PCodeText_Space_size);
// GUI_Display_Version_Code_Service(160, 40, "77", Letter_Num_11, PCodeText_Space_size);
//
Battery_evel = 0;
//
VSpeed_val = 99;
Battery_evel
=
0
;
VSpeed_val
=
99
;
//
TFT_LCD_Draw_Bmp(140, 40+25+25, ( uint8_t * )NO_T);
//
TFT_LCD_Draw_Bmp(140+18, 40+25+25, ( uint8_t * )NO_T);
//
TFT_LCD_Draw_Bmp(140+18+18, 40+25+25, ( uint8_t * )NO_F);
//
TFT_LCD_Draw_Bmp(140+18+18+18, 40+25+25, ( uint8_t * )NO_A);
//
TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25, ( uint8_t * )NO_R);
TFT_LCD_Draw_Bmp
(
140
,
40
+
25
+
25
,
(
uint8_t
*
)
NO_T
);
TFT_LCD_Draw_Bmp
(
140
+
18
,
40
+
25
+
25
,
(
uint8_t
*
)
NO_T
);
TFT_LCD_Draw_Bmp
(
140
+
18
+
18
,
40
+
25
+
25
,
(
uint8_t
*
)
NO_F
);
TFT_LCD_Draw_Bmp
(
140
+
18
+
18
+
18
,
40
+
25
+
25
,
(
uint8_t
*
)
NO_A
);
TFT_LCD_Draw_Bmp
(
140
+
18
+
18
+
18
+
18
,
40
+
25
+
25
,
(
uint8_t
*
)
NO_R
);
//
TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_W);
TFT_LCD_Draw_Bmp
(
180
,
40
+
25
+
25
+
25
,
(
uint8_t
*
)
NO_W
);
//
GUI_Display_Version_Code_Service(145, 40+25+25+25, "-100", Letter_Num_11, PCodeText_Space_size);
GUI_Display_Version_Code_Service
(
145
,
40
+
25
+
25
+
25
,
"-100"
,
Letter_Num_11
,
PCodeText_Space_size
);
// GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(160,40+25+25+25+25, ( uint8_t * )gImage_gImage_red1X6_Y16);
...
...
@@ -4880,8 +4880,8 @@ void Display_Send_Vspead(uint8_t menu)
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_7);
//
break;
case
8
:
break
;
case
9
:
// GUI_Display_Version_Code_Service(160, 40+25, "88", Letter_Num_11, PCodeText_Space_size);
// GUI_Display_Version_Code_Service(160, 40, "88", Letter_Num_11, PCodeText_Space_size);
Battery_evel
=
0
;
...
...
@@ -4907,7 +4907,7 @@ void Display_Send_Vspead(uint8_t menu)
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_lowPower1X6_Y16);
break
;
case
9
:
case
10
:
// GUI_Display_Version_Code_Service(160, 40+25, "99", Letter_Num_11, PCodeText_Space_size);
// GUI_Display_Version_Code_Service(160, 40, "99", Letter_Num_11, PCodeText_Space_size);
Battery_evel
=
0
;
...
...
@@ -4930,7 +4930,7 @@ void Display_Send_Vspead(uint8_t menu)
// GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size);
break
;
case
1
0
:
case
1
1
:
// GUI_Display_Version_Code_Service(160, 40+25, "100", Letter_Num_11, PCodeText_Space_size);
// GUI_Display_Version_Code_Service(160, 40, "99", Letter_Num_11, PCodeText_Space_size);
Battery_evel
=
100
;
...
...
@@ -4947,11 +4947,11 @@ void Display_Send_Vspead(uint8_t menu)
TFT_LCD_Draw_Bmp
(
3
,
50
,
(
uint8_t
*
)
NO_P
);
// GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size);
break
;
case
1
1
:
case
1
2
:
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_bluetoothX6_Y165);
TFT_LCD_Draw_Bmp
(
3
,
50
,
(
uint8_t
*
)
NO_R
);
break
;
case
1
2
:
case
1
3
:
// POWER_CTRL_KL30 = 0u; //B+
// POWER_CTRL_KL15 = 0u; //KL15
// CAN_Msg_Tx_Enable = 0u;
...
...
@@ -4963,29 +4963,23 @@ void Display_Send_Vspead(uint8_t menu)
// HW_Static_Current_Check(1);
TFT_LCD_Draw_Bmp
(
3
,
50
,
(
uint8_t
*
)
NO_H
);
break
;
case
1
3
:
case
1
4
:
// GUI_Display_Version_Code_Service(25, 20, "Please enter password ", Letter_Num_11, PCodeText_Space_size);
Battery_evel
=
0
;
VSpeed_val
=
99
;
GUI_Display_Version_Code_Service
(
70
,
40
+
25
+
25
+
25
+
25
+
25
+
25
+
25
,
"ALL"
,
Letter_Num_11
,
PCodeText_Space_size
);
break
;
case
1
4
:
case
1
5
:
// blename[4] = 0xFF;
// if((blename[0]+blename[1]+blename[2]+blename[3]) != 0)
// {
// General_Number_Disp(blename, 3, 165);
// }
Battery_evel
=
0
;
VSpeed_val
=
99
;
if
(
KeyStep
!=
3
)
{
GUI_Display_Version_Code_Service
(
25
,
20
,
"Please enter password "
,
Letter_Num_11
,
PCodeText_Space_size
);
}
// memset(blename,0xFF,5);
// Display_TFT_Clear();
memset
(
blename
,
0xFF
,
5
);
Display_TFT_Clear
();
break
;
case
1
5
:
blename
[
4
]
=
0xFF
;
case
1
6
:
blename
[
4
]
=
0xFF
;
GUI_Display_Version_Code_Service
(
3
,
150
,
"BT Name is "
,
Letter_Num_11
,
PCodeText_Space_size
);
if
(((
blename
[
0
]
+
blename
[
1
]
+
blename
[
2
]
+
blename
[
3
])
!=
0
)
&&
(
blename
[
0
]
!=
0xFF
)
&&
(
blename
[
1
]
!=
0xFF
)
&&
(
blename
[
2
]
!=
0xFF
)
&&
(
blename
[
3
]
!=
0xFF
))
{
...
...
@@ -4996,9 +4990,9 @@ void Display_Send_Vspead(uint8_t menu)
MENU_CHECK_STEP
=
0
;
break
;
}
if
(((
menu
>
1
)
&&
(
menu
<
9
))
||
(
menu
==
13
))
if
(((
menu
>
1
)
&&
(
menu
<
10
))
||
(
menu
==
14
))
{
if
((
KeyStep
!=
3
)
&&
(
menu
==
14
))
if
((
KeyStep
!=
3
)
&&
(
menu
==
7
))
{
;
}
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
6e83c34b
...
...
@@ -298,7 +298,7 @@ void confirmkeyserve(void)
uint8_t
KeyStep
=
0
;
void
PasswordUnlock
(
void
)
{
if
(
MENU_CHECK_STEP
==
14
)
if
(
MENU_CHECK_STEP
==
7
)
{
if
(
KeyStep
==
0
)
{
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
6e83c34b
...
...
@@ -81,15 +81,15 @@ uint32_t R485_Send_0xD0(void)
R485_IDD0h
.
Sig
.
GSM_State
=
0
;
break
;
// case 8:
// R485_IDD0h.Sig.IOT_RealTime_Hour = 0x11;
// R485_IDD0h.Sig.IOT_RealTime_Minute = 0x07;
// R485_IDD0h.Sig.IOT_RealTime_Second = 0x00; //时分秒
// R485_IDD0h.Sig.GPS_State = 0;
// R485_IDD0h.Sig.GSM_State = 0;
// break;
case
8
:
R485_IDD0h
.
Sig
.
IOT_RealTime_Hour
=
0x11
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Minute
=
0x07
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Second
=
0x00
;
//时分秒
R485_IDD0h
.
Sig
.
GPS_State
=
0
;
R485_IDD0h
.
Sig
.
GSM_State
=
0
;
break
;
case
9
:
R485_IDD0h
.
Sig
.
IOT_RealTime_Hour
=
0x12
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Minute
=
0x08
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Second
=
0x00
;
//时分秒
...
...
@@ -97,7 +97,7 @@ uint32_t R485_Send_0xD0(void)
R485_IDD0h
.
Sig
.
GSM_State
=
0
;
break
;
case
9
:
case
10
:
R485_IDD0h
.
Sig
.
IOT_RealTime_Hour
=
0x13
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Minute
=
0x09
;
R485_IDD0h
.
Sig
.
IOT_RealTime_Second
=
0x00
;
//时分秒
...
...
@@ -163,20 +163,20 @@ uint32_t R485_Send_0xD1(void)
R485_IDD1h
.
Sig
.
MainBatteryQuantity
=
0x00
;
//电量
break
;
// case 8:
// R485_IDD1h.Sig.MainBatteryQuantity = 0x00; //电量
// break;
case
8
:
R485_IDD1h
.
Sig
.
MainBatteryQuantity
=
0x00
;
//电量
break
;
case
9
:
R485_IDD1h
.
Sig
.
MainBatteryQuantity
=
0x00
;
//电量
// R485_IDD1h.Sig.BatteryChargingStatus = 0x01; //充电枪
break
;
case
13
:
case
10
:
R485_IDD1h
.
Sig
.
MainBatteryQuantity
=
0x00
;
//电量
R485_IDD1h
.
Sig
.
BatteryChargingStatus
=
0x01
;
//充电枪
break
;
case
14
:
R485_IDD1h
.
Sig
.
BatteryChargingStatus
=
0x01
;
//充电枪
default:
...
...
@@ -240,6 +240,11 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
ParkinFeedback
=
0x00
;
R485_IDD2h
.
Sig
.
SpeedGear
=
0x01
;
//档位TTFAR
R485_IDD2h
.
Sig
.
CruiseModeFeedback
=
0x01
;
//巡航灯
R485_IDD2h
.
Sig
.
SlopeDescentFunctionStatus
=
0x01
;
//陡坡缓降
R485_IDD2h
.
Sig
.
SteepHillDescentEnable
=
0x00
;
R485_IDD2h
.
Sig
.
MCUFaultStatus_HandlebarFault
=
0x01
;
//故障灯
break
;
...
...
@@ -260,11 +265,6 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
TCSActivation
=
0x02
;
//TCS
R485_IDD2h
.
Sig
.
FaultCorrecting
=
0x00
;
//修复模式
R485_IDD2h
.
Sig
.
CruiseModeFeedback
=
0x01
;
//巡航灯
R485_IDD2h
.
Sig
.
SlopeDescentFunctionStatus
=
0x01
;
//陡坡缓降
R485_IDD2h
.
Sig
.
SteepHillDescentEnable
=
0x00
;
break
;
case
4
:
...
...
@@ -327,23 +327,23 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
ClaudicationPatternFeedback
=
0x01
;
//龟速行驶
break
;
//
case 8:
//
R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_L = 0xDE;
//
R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_H = 0x02; //车速99
case
8
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0xDE
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x02
;
//车速99
//
R485_IDD2h.Sig.BusbarVoltage = 0xC8;
//
R485_IDD2h.Sig.BusbarCurrent = 0x30; //电流为负
R485_IDD2h
.
Sig
.
BusbarVoltage
=
0xC8
;
R485_IDD2h
.
Sig
.
BusbarCurrent
=
0x30
;
//电流为负
//
R485_IDD2h.Sig.SpeedGear = 0x01; //不为free模式
R485_IDD2h
.
Sig
.
SpeedGear
=
0x01
;
//不为free模式
//
R485_IDD2h.Sig.RecuperationStatusFeedback = 0x01; //能量回收功能设置反馈为1 //能量回收100格
R485_IDD2h
.
Sig
.
RecuperationStatusFeedback
=
0x01
;
//能量回收功能设置反馈为1 //能量回收100格
//
//
R485_IDD2h.Sig.MCUFaultStatus_HandlebarFault = 0x01; //整车故障等
// R485_IDD2h.Sig.MCUFaultStatus_HandlebarFault = 0x01; //整车故障等
//
//
R485_IDD2h.Sig.RampParkedState = 0x01; //坡道驻停状态(氛围灯红色闪烁两次)
//
break;
// R485_IDD2h.Sig.RampParkedState = 0x01; //坡道驻停状态(氛围灯红色闪烁两次)
break
;
case
8
:
case
9
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0xDE
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x02
;
//车速99
...
...
@@ -355,7 +355,7 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
RecuperationStatusFeedback
=
0x01
;
//能量回收功能设置反馈为1 //能量回收100格
break
;
case
9
:
case
10
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0x00
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x00
;
//车速00
...
...
@@ -363,7 +363,7 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
SpeedGear
=
0x00
;
//档位-助力推行
break
;
case
1
0
:
case
1
1
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0x00
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x00
;
//车速00
...
...
@@ -371,7 +371,7 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
ParkinFeedback
=
0x01
;
//驻车挡位P档
break
;
case
1
1
:
case
1
2
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0x00
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x00
;
//车速00
...
...
@@ -380,11 +380,11 @@ uint32_t R485_Send_0xD2(void)
R485_IDD2h
.
Sig
.
ReverseModeFeedback
=
0x01
;
//倒挡模式
break
;
case
1
2
:
case
1
3
:
R485_IDD2h
.
Sig
.
RampParkedState
=
0x01
;
//坡道驻停
break
;
case
1
3
:
case
1
4
:
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_L
=
0xDE
;
R485_IDD2h
.
Sig
.
ICMCalculatesVehicleSpeed_H
=
0x02
;
//车速99
...
...
@@ -487,10 +487,21 @@ uint32_t R485_Send_0xD3(void)
R485_IDD3h
.
Sig
.
AutoheadLightSetting
=
0x01
;
//自动大灯
break
;
// case 7:
// break;
case
7
:
if
(
KeyStep
==
3
)
{
R485_IDD3h
.
Sig
.
PasswordUnlockCommand
=
0x00
;
//密码解锁
}
else
{
R485_IDD3h
.
Sig
.
PasswordUnlockCommand
=
0x01
;
//密码解锁
}
break
;
case
9
:
case
10
:
R485_IDD3h
.
Sig
.
SupportSwitchState
=
0x01
;
//边撑状态
R485_IDD3h
.
Sig
.
AutoheadLightSetting
=
0x01
;
//自动大灯
R485_IDD3h
.
Sig
.
ElectronicCushionStatus
=
0x01
;
//座桶开启灯
break
;
if
(
mimayanzhengjieguo
==
1
)
...
...
@@ -503,7 +514,7 @@ uint32_t R485_Send_0xD3(void)
}
break
;
case
1
0
:
case
1
4
:
R485_IDD3h
.
Sig
.
ElectronicCushionStatus
=
0x01
;
//座桶开启灯
default:
...
...
@@ -515,23 +526,6 @@ uint32_t R485_Send_0xD3(void)
R485_IDD3h
.
Sig
.
AutoheadLightSetting
=
0x00
;
//自动大灯
break
;
case
13
:
R485_IDD3h
.
Sig
.
SupportSwitchState
=
0x01
;
//边撑状态
R485_IDD3h
.
Sig
.
AutoheadLightSetting
=
0x01
;
//自动大灯
R485_IDD3h
.
Sig
.
ElectronicCushionStatus
=
0x01
;
//座桶开启灯
break
;
case
14
:
if
(
KeyStep
==
3
)
{
R485_IDD3h
.
Sig
.
PasswordUnlockCommand
=
0x00
;
//密码解锁
}
else
{
R485_IDD3h
.
Sig
.
PasswordUnlockCommand
=
0x01
;
//密码解锁
}
break
;
}
}
else
...
...
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