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
3903d112
Commit
3903d112
authored
Dec 02, 2024
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改
parent
7e42f9ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
bsp_app_AUTO.c
source/bsp_source/bsp_button/bsp_app_AUTO.c
+19
-3
bsp_app_AUTO.h
source/bsp_source/bsp_button/bsp_app_AUTO.h
+1
-1
No files found.
source/bsp_source/bsp_button/bsp_app_AUTO.c
View file @
3903d112
...
...
@@ -304,12 +304,13 @@ void build_number1(void)
Send_7CE_Data
.
Byte5Data
=
0x00
;
Send_7CE_Data
.
Byte6Data
=
0x00
;
Send_7CE_Data
.
Byte7Data
=
0x00
;
CanFD_Send_StandMsg
(
CANFD0_Type
,
0x7
81
,
BUF_40
,
TX_ISR_EN
,
(
uint8_t
*
)
&
Send_7CE_Data
.
mdata
,
8
);
CanFD_Send_StandMsg
(
CANFD0_Type
,
0x7
02
,
BUF_40
,
TX_ISR_EN
,
(
uint8_t
*
)
&
Send_7CE_Data
.
mdata
,
8
);
SendNUM1
=
FINISH
;
}
if
(
BetweenTime
(
100
,
200
)
&&
RxFinish
==
FINISH
)
{
//???????
App_Uds_Calc_Key
(
&
MultiplePack
.
Data
[
0
]);
GetNUM1
(
0
);
GetNUM1
(
1
);
GetNUM1
(
2
);
GetNUM1
(
3
);
GetNUM1
(
4
);
GetNUM1
(
5
);
GetNUM1
(
6
);
GetNUM1
(
7
);
}
else
if
(
BetweenTime
(
200
,
300
)
&&
MultiplePack
.
Data
[
0
]
!=
0x0
){
...
...
@@ -341,7 +342,22 @@ void build_number1(void)
Buzzer_Alarm
();
}
}
uint8_t
DiagnoCtl_key
[
4
];
void
App_Uds_Calc_Key
(
uint8_t
seed
[
4
])
{
uint8_t
Xor
[
4
]
=
{
0x56
,
0x45
,
0x73
,
0x54
};
uint8_t
Cal
[
4
];
Cal
[
0
]
=
seed
[
0
]
^
Xor
[
0
];
Cal
[
1
]
=
seed
[
1
]
^
Xor
[
1
];
Cal
[
2
]
=
seed
[
2
]
^
Xor
[
2
];
Cal
[
3
]
=
seed
[
3
]
^
Xor
[
3
];
DiagnoCtl_key
[
0
]
=
((
Cal
[
0
]
&
0x0f
)
<<
4
)
|
(
Cal
[
1
]
&
0xf0
);
DiagnoCtl_key
[
1
]
=
((
Cal
[
1
]
&
0x0f
)
<<
4
)
|
((
Cal
[
2
]
&
0xf0
)
>>
4
);
DiagnoCtl_key
[
2
]
=
(
Cal
[
2
]
&
0xf0
)
|
((
Cal
[
3
]
&
0xf0
)
>>
4
);
DiagnoCtl_key
[
3
]
=
((
Cal
[
3
]
&
0x0f
)
<<
4
)
|
(
Cal
[
0
]
&
0x0f
);
}
//内部版本号2
void
build_number2
(
void
)
{
...
...
@@ -372,7 +388,7 @@ void build_number2(void)
Send_7CE_Data
.
Byte5Data
=
0x00
;
Send_7CE_Data
.
Byte6Data
=
0x00
;
Send_7CE_Data
.
Byte7Data
=
0x00
;
CanFD_Send_StandMsg
(
CANFD0_Type
,
0x78
1
,
BUF_40
,
TX_ISR_EN
,
(
uint8_t
*
)
&
Send_7CE_Data
.
mdata
,
8
);
CanFD_Send_StandMsg
(
CANFD0_Type
,
0x78
2
,
BUF_40
,
TX_ISR_EN
,
(
uint8_t
*
)
&
Send_7CE_Data
.
mdata
,
8
);
SendNUM2
=
FINISH
;
}
...
...
source/bsp_source/bsp_button/bsp_app_AUTO.h
View file @
3903d112
...
...
@@ -2,5 +2,5 @@
#define _BSP_BUTTON_AUTO
extern
void
TestReadFuel
(
void
);
extern
void
App_Uds_Calc_Key
(
uint8_t
seed
[
4
]);
#endif
\ No newline at end of file
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