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
945e4ca0
Commit
945e4ca0
authored
Dec 17, 2024
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加上电KL15、30、13.5V电25s,断总电5s和断13.5V电5s的功能
parent
894c4295
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
93 additions
and
13 deletions
+93
-13
Application.gpj
YueJin_test_bench/ghs/group/Application.gpj
+2
-0
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+2
-2
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+1
-1
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+4
-4
Power_Controls.c
YueJin_test_bench/source/Appliciation/Power_Controls.c
+59
-0
Power_Controls.h
YueJin_test_bench/source/Appliciation/Power_Controls.h
+16
-0
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+1
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+1
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+6
-3
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+1
-1
No files found.
YueJin_test_bench/ghs/group/Application.gpj
View file @
945e4ca0
...
...
@@ -2,6 +2,8 @@
[Subproject]
:sourceDir=..\..\source\Appliciation
Power_Controls.c
Power_Controls.h
api_RS485.c
api_RS485.h
R485_Communication_Matrix.c
...
...
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
945e4ca0
...
...
@@ -59,7 +59,7 @@ uint8_t KEYBUFFER [ 4 ];
uint32_t
CAN_Msg_Tx_Enable
;
uint32_t
MENU_CHECK_STEP
;
uint32_t
MENU_CHECK_STEP
=
10U
;
uint32_t
Global_Session
=
0
;
uint32_t
loc_Step
;
...
...
@@ -85,7 +85,7 @@ void MENU_CHECK_STEP_SUB(void)
void
MENU_CHECK_Init
(
void
)
{
MENU_CHECK_STEP
=
0
;
MENU_CHECK_STEP
=
10U
;
}
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
945e4ca0
...
...
@@ -4489,7 +4489,7 @@ void Display_Send_Vspead(uint8_t menu)
break
;
default:
MENU_CHECK_STEP
=
0
;
MENU_CHECK_STEP
=
10u
;
break
;
}
if
(
menu
!=
12
)
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
945e4ca0
...
...
@@ -18,7 +18,7 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
Display_TFT_Clear
(
);
}
MENU_CHECK_STEP_ADD
(
);
//
MENU_CHECK_STEP_ADD( );
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
...
@@ -64,7 +64,7 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
// Display_Sub( );
// Display_TFT_Clear( );
// }
MENU_CHECK_STEP_SUB
();
//
MENU_CHECK_STEP_SUB();
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -192,7 +192,7 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
{
if
(
Get_Display_Type
(
)
==
2
)
{
MENU_CHECK_STEP_SUB
(
);
//
MENU_CHECK_STEP_SUB( );
}
}
else
...
...
@@ -221,7 +221,7 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{
if
(
Get_Display_Type
(
)
==
2
)
{
MENU_CHECK_STEP_ADD
(
);
//
MENU_CHECK_STEP_ADD( );
}
}
else
...
...
YueJin_test_bench/source/Appliciation/Power_Controls.c
0 → 100644
View file @
945e4ca0
#include "Power_Controls.h"
uint16_t
PowerCountNum
=
0U
;
uint8_t
KL1530ON
=
0U
;
uint8_t
ControlsStatus
=
DUAN_DIAN_STATE
;
void
Power_Control_Count
(
void
)
{
if
(
PowerCountNum
<=
250U
)
{
KL1530ON
=
1U
;
PowerCountNum
++
;
}
else
if
((
PowerCountNum
>
250U
)
&&
(
PowerCountNum
<
300U
))
{
KL1530ON
=
0U
;
PowerCountNum
++
;
}
else
{
KL1530ON
=
0U
;
PowerCountNum
=
0U
;
}
}
void
Power_KL15_KL30_Controls
(
void
)
{
if
(
ControlsStatus
==
1U
)
{
if
(
KL1530ON
==
1U
)
{
LINE_OUT_NEG_01
=
1U
;
LINE_OUT_NEG_02
=
1U
;
LINE_OUT_NEG_03
=
1U
;
LINE_OUT_NEG_04
=
1U
;
}
else
{
LINE_OUT_NEG_01
=
0U
;
LINE_OUT_NEG_02
=
0U
;
LINE_OUT_NEG_03
=
0U
;
LINE_OUT_NEG_04
=
0U
;
}
}
else
{
if
(
KL1530ON
==
1U
)
{
LINE_OUT_NEG_01
=
1U
;
}
else
{
LINE_OUT_NEG_01
=
0U
;
}
}
}
YueJin_test_bench/source/Appliciation/Power_Controls.h
0 → 100644
View file @
945e4ca0
#ifndef POWER_CONTROLS_H__
#define POWER_CONTROLS_H__
#include "RTE_GPIO.h"
#include "Key.h"
#include "Display_Info.h"
#include "Check_Ctrl.h"
#include "Barcode_Scanner.h"
#include "Task.h"
#define DUAN_DIAN_STATE 0
/*0--只控制13.5V电,1--控制所有电*/
extern
void
Power_Control_Count
(
void
);
extern
void
Power_KL15_KL30_Controls
(
void
);
#endif
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
945e4ca0
...
...
@@ -583,7 +583,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h
.
Sig
.
RotorLocked
=
0
;
break
;
case
10
:
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x
30
0
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 88km
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x0
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 88km
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0xC6
;
//电量
R485_ID41h
.
Sig
.
VehicleStatus
=
0x3
;
//整车状态
R485_ID41h
.
Sig
.
SpeedGear
=
0
;
//挡位
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
945e4ca0
...
...
@@ -90,7 +90,7 @@
// #define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08
// #define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 //12V
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 //12V
----13.5电
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 //BAT
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04 //BAT~
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03 //ACC1
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
945e4ca0
...
...
@@ -20,6 +20,7 @@
#include "string.h"
#include "api_RS485.h"
#include "R485_Communication_Matrix.h"
#include "Power_Controls.h"
/*******************************************************************************
* *
* ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� *
...
...
@@ -105,7 +106,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
{
if
(
zhenduanflag
==
0
)
{
R485_Send_Line_0x47
(
MENU_CHECK_STEP
);
//
R485_Send_Line_0x47(MENU_CHECK_STEP);
RS485_User_Tx_Data
();
comparestart
=
0
;
}
...
...
@@ -205,7 +206,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
timerms
++
;
}
Power_KL15_KL30_Controls
();
// if ( timer_100ms >= 500 )
// {
...
...
@@ -278,7 +279,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
}
else
{
MENU_CHECK_STEP_ADD
(
);
//
MENU_CHECK_STEP_ADD( );
AutoTime
=
0
;
}
...
...
@@ -344,6 +345,7 @@ void Sys_Exact_50us_Tasks(void)
{
GenDelay_Tick
(
);
DoCAN_Timer_Update
(
50u
);
}
/*============================================================================*/
...
...
@@ -358,6 +360,7 @@ void Sys_Exact_50us_Tasks(void)
void
Sys_Exact_100ms_Tasks
(
void
)
{
// CHECK_IPK_COUNT( );
Power_Control_Count
();
}
/*============================================================================*/
void
Sys_Enter_Sleep_Mode
(
void
)
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
945e4ca0
...
...
@@ -505,7 +505,7 @@ void RS485_User_Tx_Data(void)
}
void
backsend
(
void
)
{
if
(
RS485_send_time
>=
2
0
)
if
(
RS485_send_time
>=
2
)
{
RS485_send_time
=
0
;
RS485_TX_finish
=
0
;
...
...
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