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
0ccb6d3d
Commit
0ccb6d3d
authored
Jun 07, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加静态电流
parent
094022e6
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
110 additions
and
127 deletions
+110
-127
settings.json
.vscode/settings.json
+3
-1
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+4
-6
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+1
-1
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+46
-109
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+6
-3
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+2
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+7
-3
RTE_GPIO.c
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
+18
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+6
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+2
-0
Task.h
YueJin_test_bench/source/Appliciation/Task.h
+1
-0
ADC.c
YueJin_test_bench/source/Driver/Analog_Signals/ADC.c
+2
-0
ADC.h
YueJin_test_bench/source/Driver/Analog_Signals/ADC.h
+10
-1
Analog_Signals.h
..._test_bench/source/Driver/Analog_Signals/Analog_Signals.h
+1
-0
Analog_Signals.c
...n_test_bench/utility/config_Adc/src/8-18/Analog_Signals.c
+1
-1
No files found.
.vscode/settings.json
View file @
0ccb6d3d
...
...
@@ -61,6 +61,8 @@
"can_communication_matrix.h"
:
"c"
,
"display_info.h"
:
"c"
,
"com_can.h"
:
"c"
,
"task.h"
:
"c"
"task.h"
:
"c"
,
"simulated_8080.h"
:
"c"
,
"analog_signals.h"
:
"c"
}
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
0ccb6d3d
...
...
@@ -126,7 +126,6 @@ void Can_Set_Buff_042(uint8_t CopyData [])
else
if
(
Tcs
==
2
)
/*灭*/
{
pCANMsg
->
Sig
.
TCS
=
0
;
//
//pCANMsg->Sig.Tcs_Control = 1;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
...
...
@@ -294,10 +293,10 @@ void Can_Set_Buff_001(uint8_t CopyData [])
{
pCANMsg
->
Sig
.
Motor_hert
=
1
;
}
// if( == 1)
//
{
//
pCANMsg->Sig.Msg_0x001_2b3t = 1;
//
}
if
(
Energy_recovery
==
2
)
/*能量回收*/
{
pCANMsg
->
Sig
.
Msg_0x001_2b3t
=
1
;
}
}
void
Can_Set_Buff_021
(
uint8_t
CopyData
[])
...
...
@@ -345,7 +344,6 @@ void Can_Set_Buff_284(uint8_t CopyData [])
if
(
NFC_C_card
==
1
)
{
pCANMsg
->
Sig
.
NFC_C_card
=
1
;
//Display_Can_Receive_Data(20,240);
}
else
if
((
NFC_C_card
==
2
))
{
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
0ccb6d3d
...
...
@@ -218,7 +218,7 @@ typedef union
}
Sig
;
}
CANMsg284Union
;
//诊断
//诊断
发送
typedef
union
{
uint8_t
Msg
[
8
];
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
0ccb6d3d
...
...
@@ -34,6 +34,11 @@ uint8_t canData2[14];
uint8_t
canData3
[
10
];
uint8_t
canData4
[
8
];
//暂存硬件版本号数据用
static
uint32_t
VoltageADC_CH_9_value_
=
0
;
static
uint32_t
VoltageADC_CH_9_value
=
0
;
uint16_t
count_electric_current
=
0
;
uint32_t
text5
[
2
];
const
unsigned
char
gImage_cuo11
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X30
,
0X70
,
0XE0
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0X70
,
0X30
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X83
,
0XC7
,
0X66
,
0X38
,
0X38
,
0X7C
,
0XE6
,
0XC3
,
0X81
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X0C
,
0X0C
,
0X06
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X0E
,
0X0C
,
0X00
,
0X00
,
0X00
,
0X00
,};
...
...
@@ -2567,32 +2572,6 @@ const uint8_t * FONT_TABLE_11[] =
};
// clang-format on
uint8_t
ConverToFont
(
uint8_t
input
)
{
...
...
@@ -3596,6 +3575,14 @@ void Display_Title_Info(void)// 检测台 标题
const
uint16_t
VoltageDigitNum09PosX
[]
=
{
190
,
170
,
160
};
/**
* @brief 检查硬件电压
*
* 根据传入的命令参数,执行不同的操作。当命令参数为0时,不执行任何操作;
* 当命令参数为1时,读取KL30电压值,并进行平均处理,最后将处理后的电压值显示在GUI上。
*
* @param cmd 命令参数,0表示不执行任何操作,1表示检查电压
*/
void
HW_Voltage_Check
(
uint32_t
cmd
)
{
uint32_t
Voltage
=
0
;
...
...
@@ -4446,89 +4433,8 @@ void Display_Can_Data(uint8_t Data , uint16_t X,uint8_t Y)
}
}
void
Get_CAN_CH4_ID_750_Diagnosis_return0
()
{
// uint8_t segment0 = Get_CAN_CH4_ID_750_Diagnosis_return750_1_5();
// uint8_t segment1 = Get_CAN_CH4_ID_750_Diagnosis_return750_1_6();
// uint8_t segment2 = Get_CAN_CH4_ID_750_Diagnosis_return750_1_7();
// if(segment0!=NULL)
// {
// canData_banben[0] = segment0;
// }
// if(segment1!=NULL)
// {
// canData_banben[1] = segment1;
// }
// if(segment2!=NULL)
// {
// canData_banben[2] = segment2;
// }
}
void
Get_CAN_CH4_ID_750_Diagnosis_return1
()
{
// uint8_t segment3 = Get_CAN_CH4_ID_750_Diagnosis_return2_1();
// uint8_t segment4 = Get_CAN_CH4_ID_750_Diagnosis_return2_2();
// uint8_t segment5 = Get_CAN_CH4_ID_750_Diagnosis_return2_3();
// uint8_t segment6 = Get_CAN_CH4_ID_750_Diagnosis_return2_4();
// uint8_t segment7 = Get_CAN_CH4_ID_750_Diagnosis_return2_5();
// uint8_t segment8 = Get_CAN_CH4_ID_750_Diagnosis_return2_6();
// uint8_t segment9 = Get_CAN_CH4_ID_750_Diagnosis_return2_7();
// if(segment3!=NULL)
// {
// canData_banben[3] = segment3;
// }
// if(segment4!=NULL)
// {
// canData_banben[4] = segment4;
// }
// if(segment5!=NULL)
// {
// canData_banben[5] = segment5;
// }
// if(segment6!=NULL)
// {
// canData_banben[6] = segment6;
// }
// if(segment7!=NULL)
// {
// canData_banben[7] = segment7;
// }
// if(segment8!=NULL)
// {
// canData_banben[8] = segment8;
// }
// if(segment9!=NULL)
// {
// canData_banben[9] = segment9;
// }
// // canData_banben[4] = segment4;
// // canData_banben[5] = segment5;
// // canData_banben[6] = segment6;
// // canData_banben[7] = segment7;
// // canData_banben[8] = segment8;
// // canData_banben[9] = segment9;
// uint8_t segment10 = Get_CAN_CH4_ID_750_Diagnosis_return3_1();
// uint8_t segment11 = Get_CAN_CH4_ID_750_Diagnosis_return3_2();
// uint8_t segment12 = Get_CAN_CH4_ID_750_Diagnosis_return3_3();
// if(segment10!=NULL)
// {
// canData_banben[10] = segment10;
// }
// if(segment11!=NULL)
// {
// canData_banben[11] = segment11;
// }
// if(segment12!=NULL)
// {
// canData_banben[12] = segment12;
// }
// canData_banben[13]= 0XFF;
}
//版本号显示
const
uint16_t
CurrentDigitNum15PosX
[]
=
{
50
,
40
,
30
};
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
)
{
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
8
]
==
1
)
...
...
@@ -4537,10 +4443,41 @@ void Display_Can_Receive_Data(uint16_t X,uint8_t Y)
TFT_LCD_Draw_Bmp
(
X
,
Y
+
50
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
General_Number_Disp
(
canData2
,
X
+
70
,
Y
);
General_Number_Disp
(
canData3
,
X
+
70
,
Y
+
50
);
}
GUI_General_Digit_Display
(
text5
[
0
],
Num_15
,
3
,
0
,
CurrentDigitNum15PosX
,
200
);
}
}
void
Obtain_The_Static_Current
(
void
)
{
/*设置B+两个引脚*/
Quiescent_current_B_
=
1
;
Quiescent_current_B
=
0
;
/*置15电*/
//POWER_CTRL_KL15 = 1;
/*采集ADC*/
count_electric_current
++
;
VoltageADC_CH_9_value_
+=
ADC_Read_Signal
(
ADC_CH_KL15_VOLTAGE
);
if
(
count_electric_current
==
1999
)
{
VoltageADC_CH_9_value
=
VoltageADC_CH_9_value_
/
2000
;
text5
[
0
]
=
VoltageADC_CH_9_value
;
text5
[
1
]
=
0Xff
;
// text5[0]=VoltageADC_CH_9_value;
// text5[1]=0Xff;
VoltageADC_CH_9_value_
=
0
;
count_electric_current
=
0
;
}
}
void
Display_flag
(
uint8_t
Check_Steps
)
{
// if()
...
...
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
0ccb6d3d
...
...
@@ -75,7 +75,7 @@ void Display_Can_Data(uint8_t Data , uint16_t X,uint8_t Y);
void
Display_buffer_ID
(
uint16_t
X
,
uint8_t
Y
);
void
Display_Chaka_Model
(
void
);
void
Display_interface_learning_card
(
uint16_t
X
,
uint8_t
Y
);
//void Display_Can_Receive_Data(uint8_t Data[] , uint16_t X,uint8_t Y);
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
);
void
Display_Set_Buff
(
void
);
...
...
@@ -86,6 +86,8 @@ void Buzzer_Stop(void);
extern
void
Buzzer_Init
(
void
);
extern
void
Buzzer_Warning
(
void
);
void
Obtain_The_Static_Current
(
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
);
...
...
@@ -105,8 +107,6 @@ extern uint32_t loc_Current_0;
extern
void
Get_static_Current
(
void
);
extern
uint32_t
Get_Display_Type
(
void
);
extern
void
Display_Num
(
uint16_t
StartX
,
uint16_t
StartY
,
uint16_t
m_NUM
,
uint8_t
CbkCycle
);
void
Get_CAN_CH4_ID_750_Diagnosis_return1
();
void
Get_CAN_CH4_ID_750_Diagnosis_return2
();
extern
const
uint8_t
*
Num_15
[];
typedef
struct
{
uint8_t
going
[
5
];
...
...
@@ -118,6 +118,9 @@ extern uint8_t canData1[8];
extern
uint8_t
canData2
[
14
];
extern
uint8_t
canData3
[
10
];
extern
uint8_t
canData4
[
8
];
//uint8_t VoltageADC_CH_9_value;
//extern u8_All_Flag_t All_Flag;
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#endif
YueJin_test_bench/source/Appliciation/Key.h
View file @
0ccb6d3d
...
...
@@ -145,6 +145,8 @@ extern uint8_t canData2[14];
extern
uint8_t
canData3
[
10
];
extern
uint8_t
canData4
[
8
];
extern
uint32_t
text5
[
2
];
#endif
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
0ccb6d3d
...
...
@@ -171,18 +171,22 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{
}
}
void
Key_Operation_SW8
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
8
]
=
1
;
memset
(
canData1
,
0
,
sizeof
(
canData1
)
*
sizeof
(
canData1
[
0
]));
/*清除上次CAN诊断接收的数据*/
memset
(
canData4
,
0
,
sizeof
(
canData4
)
*
sizeof
(
canData4
[
0
]));
memset
(
canData1
,
0
,
sizeof
(
canData1
));
/*清除上次CAN诊断接收的数据*/
memset
(
canData4
,
0
,
sizeof
(
canData4
));
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Display_TFT_Clear
();
Display_Can_Receive_Data
(
5
,
50
);
}
...
...
@@ -235,7 +239,7 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
{
if
(
Check_Control_Mode
==
2
)
{
All_Flag
.
u8flag
[
10
]
==
1
;
//
All_Flag.u8flag[10] == 1;
if
(((
All_Flag
.
u8flag
[
8
]
==
0
)
&&
(
All_Flag
.
u8flag
[
2
]
==
0
)
&&
(
All_Flag
.
u8flag
[
7
]
==
0
)
&&
((
All_Flag
.
u8flag
[
6
]
==
1
))))
{
Check_Steps
++
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
View file @
0ccb6d3d
...
...
@@ -174,7 +174,24 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
//GPIO_OUT_PORT10_PIN13 = 1;
// #define Quiescent_current_B_ GPIO_OUT_PORT09_PIN04/*B+~*/
// #define Quiescent_current_B GPIO_OUT_PORT09_PIN05 /*B+*/
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
/*B+~*/
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_4
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
/*B+*/
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_5
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
0ccb6d3d
...
...
@@ -48,7 +48,12 @@
#define Left_Led GPIO_OUT_APORT00_PIN15//左
#define Right_Led GPIO_OUT_PORT10_PIN14//右
#define Headlights_Led GPIO_OUT_PORT10_PIN13 //远光
#define Headlights_Led GPIO_OUT_PORT10_PIN13//远光
#define Quiescent_current_B_ GPIO_OUT_PORT09_PIN04
/*B+~*/
#define Quiescent_current_B GPIO_OUT_PORT09_PIN05
/*B+*/
#define POWER_CTRL_KL30 GPIO_OUT_PORT09_PIN05
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
0ccb6d3d
...
...
@@ -23,6 +23,7 @@
#include "R485_Communication_Matrix.h"
#include "CAN_Communication_Matrix.h"
#include "CAN_APP.h"
#include "Display_Info.h"
/*******************************************************************************
* *
* ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� *
...
...
@@ -67,6 +68,7 @@ void Sys_Run_Mode_2ms_Tasks_Group(void)
Get_static_Current
();
COM_RX_Process
(
);
COM_TX_Process
();
Obtain_The_Static_Current
();
}
/*==============================================================================
...
...
YueJin_test_bench/source/Appliciation/Task.h
View file @
0ccb6d3d
...
...
@@ -2,6 +2,7 @@
#define _TASK_H_
#include "TYW_stdint.h"
#include "ADC.h"
extern
uint8_t
AutoFlag
;
extern
uint32_t
devicename
;
...
...
YueJin_test_bench/source/Driver/Analog_Signals/ADC.c
View file @
0ccb6d3d
...
...
@@ -6,6 +6,7 @@
/*-----------------use for RH850_F1KM_S1 --------------------*/
#include "ADC.h"
#include "RTE_GPIO.h"
static
uint8_t
ADC_Get_Physical_Channel
(
uint8_t
u8ADCPhysicalChannelIndex
)
{
...
...
@@ -129,3 +130,4 @@ void ADC_Get_Conversion_Result(uint16_t *pu16Data, uint8_t u8ChNum)
}
}
}
YueJin_test_bench/source/Driver/Analog_Signals/ADC.h
View file @
0ccb6d3d
...
...
@@ -4,9 +4,17 @@
#include "r_typedefs.h"
/*-----------------use for RH850_F1KM_S1 --------------------*/
// #include "Analog_Signals.h"
#define ADC_RESOLUTION (4096U)
/* 12bit ADC */
// enum ADCCh9
// {
// ADC_CH_KL15_VOLTAGE = 0,
// ADC_CH_KL30_VOLTAGE,
// ADC_CH_9_VOLTAGE,
// };
extern
void
ADC_Init
(
const
uint8_t
u8ChList
[],
uint8_t
u8ChNum
);
extern
void
ADC_DeInit
(
void
);
...
...
@@ -15,4 +23,5 @@ extern void ADC_Stop_Conversion(void);
extern
uint8_t
ADC_Get_Conversion_Status
(
void
);
extern
void
ADC_Get_Conversion_Result
(
uint16_t
*
pu16Data
,
uint8_t
u8ChNum
);
#endif
YueJin_test_bench/source/Driver/Analog_Signals/Analog_Signals.h
View file @
0ccb6d3d
...
...
@@ -50,6 +50,7 @@ extern uint16_t ADC_Read_Signal(uint8_t u8ADCCh);
extern
uint8_t
ADC_Read_Signal_Valid
(
uint8_t
u8ADCCh
);
extern
uint16_t
ADC_Conv_Single_Channel
(
uint8_t
u8ADCCh
);
extern
uint16_t
ADC_Read_Signal_Voltage
(
uint8_t
u8ADCCh
);
extern
void
Obtain_The_Static_Current
(
void
);
/*! @} */
#ifdef __cplusplus
...
...
YueJin_test_bench/utility/config_Adc/src/8-18/Analog_Signals.c
View file @
0ccb6d3d
...
...
@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const
uint8_t
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
{
9
U
,
15U
,
10
U
,
15U
,
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
...
...
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