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
9e93071c
Commit
9e93071c
authored
Apr 18, 2025
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:旋转显示,增加燃油上电,修复问题
parent
ade23359
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
254 additions
and
142 deletions
+254
-142
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+54
-17
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+1
-0
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+59
-19
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+76
-74
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+1
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+4
-4
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+32
-0
GPIO.c
YueJin_test_bench/source/Driver/GPIO/GPIO.c
+25
-25
TM035HFZGZx.c
YueJin_test_bench/source/Driver/GPIO/TM035HFZGZx.c
+2
-2
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
9e93071c
...
...
@@ -274,8 +274,8 @@ void can_submit(void)
//故障灯
CAN_Frame_st_t
m_msg6
;
uint8_t
data6
[
8
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
//0x0C50FFD2
CAN_Frame_st_t
m_msg7
;
uint8_t
data7
[
8
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
//
CAN_Frame_st_t m_msg7;
//
uint8_t data7[8] = {0, 0, 0, 0, 0, 0, 0, 0};
switch
(
MENU_CHECK_STEP
)
...
...
@@ -642,8 +642,7 @@ void can_submit(void)
init_CAN_Frame
(
&
m_msg4
,
0x212
,
8
,
1
,
data4
);
data5
[
0
]
=
1
<<
6
;
data5
[
1
]
=
1
<<
4
;
data5
[
1
]
=
0
;
init_CAN_Frame
(
&
m_msg5
,
0x282
,
8
,
1
,
data5
);
data6
[
4
]
=
2
;
...
...
@@ -677,8 +676,7 @@ void can_submit(void)
init_CAN_Frame
(
&
m_msg4
,
0x212
,
8
,
1
,
data4
);
data5
[
0
]
=
1
<<
6
;
data5
[
1
]
=
1
<<
4
;
data5
[
1
]
=
0
;
init_CAN_Frame
(
&
m_msg5
,
0x282
,
8
,
1
,
data5
);
data6
[
4
]
=
2
;
...
...
@@ -713,8 +711,7 @@ void can_submit(void)
init_CAN_Frame
(
&
m_msg4
,
0x212
,
8
,
1
,
data4
);
data5
[
0
]
=
1
<<
6
;
data5
[
1
]
=
1
<<
4
;
data5
[
1
]
=
0
;
init_CAN_Frame
(
&
m_msg5
,
0x282
,
8
,
1
,
data5
);
data6
[
4
]
=
2
;
...
...
@@ -747,23 +744,22 @@ void can_submit(void)
init_CAN_Frame
(
&
m_msg4
,
0x212
,
8
,
1
,
data4
);
data5
[
0
]
=
1
<<
6
;
data5
[
1
]
=
1
<<
4
;
data5
[
1
]
=
1
;
init_CAN_Frame
(
&
m_msg5
,
0x282
,
8
,
1
,
data5
);
data6
[
4
]
=
2
;
init_CAN_Frame
(
&
m_msg6
,
0x091
,
8
,
1
,
data6
);
break
;
case
14
:
while
(
1
)
{
;
//这里让芯片复位要不然的话重新走仪表配置流程有点麻烦,复位的话可以直接省去修改很多条件
}
break
;
//
case 14:
// //
while(1)
// //
{
// //
;//这里让芯片复位要不然的话重新走仪表配置流程有点麻烦,复位的话可以直接省去修改很多条件
// //
}
//
break;
default:
break
;
}
if
(
MENU_CHECK_STEP
!=
0
)
if
(
MENU_CHECK_STEP
!=
0
&&
MENU_CHECK_STEP
<=
13
)
{
can_mid
(
m_msg1
);
can_mid
(
m_msg2
);
...
...
@@ -1065,6 +1061,47 @@ uint8_t resettime = 0;
uint8_t
resetflag
=
0
;
extern
uint32_t
fakedelay
;
uint32_t
resetpowtime
=
0
;
uint32_t
FUresetpowtime
=
0
;
uint8_t
fuelreset1
=
0
;
uint8_t
fuelreset2
=
0
;
uint8_t
fuelreset3
=
0
;
uint8_t
fuelreset4
=
0
;
void
resetpowerfuel
(
void
)
{
if
(
FUresetpowtime
<
100
)
{
FUresetpowtime
++
;
POWER_CTRL_KL30
=
0u
;
//B+
POWER_CTRL_KL15
=
0u
;
//KL15
}
else
{
POWER_CTRL_KL30
=
1u
;
//B+
POWER_CTRL_KL15
=
1u
;
//KL15
FUresetpowtime
=
0
;
if
(
fuelreset1
==
1
)
{
fuelreset1
=
2
;
}
else
if
(
fuelreset2
==
1
)
{
fuelreset2
=
2
;
}
else
if
(
fuelreset3
==
1
)
{
fuelreset3
=
2
;
}
else
if
(
fuelreset4
==
1
)
{
fuelreset4
=
2
;
}
else
{
;
}
}
}
void
resetpower
(
void
)
{
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
9e93071c
...
...
@@ -52,4 +52,5 @@ extern uint8_t ruanjianbanbenhao[8];
void
Get_PN_msg
(
void
);
void
change_UDS_DID
(
void
);
void
resetchangeUDSfuc
(
void
);
void
resetpowerfuel
(
void
);
#endif
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
9e93071c
...
...
@@ -69,7 +69,7 @@ void Function_Check_Ctrl(uint32_t cmd);
void
MENU_CHECK_STEP_ADD
(
void
)
{
if
(
MENU_CHECK_STEP
>
1
4
)
if
(
MENU_CHECK_STEP
>
1
3
)
{
MENU_CHECK_STEP
=
0
;
}
...
...
@@ -557,6 +557,7 @@ void Read_IPK_Session_Type(void)//请求仪表发送 软硬件版本号 等数
}
}
uint8_t
LED_Waring
=
0
;
extern
uint8_t
resetflag
;
void
Function_Check_Ctrl
(
uint32_t
cmd
)
{
uint8_t
p
[
20
];
...
...
@@ -575,12 +576,19 @@ void Function_Check_Ctrl(uint32_t cmd)
{
//
Display_Send_Vspead(MENU_CHECK_STEP);
Display_Send_Vspead
(
0
);
Display_Send_Vspead
(
MENU_CHECK_STEP
);
//
Display_Send_Vspead(0);
switch
(
MENU_CHECK_STEP
)
{
case
0
:
{
if
(
resetflag
==
0
)
{
POWER_CTRL_KL30
=
1u
;
//B+
POWER_CTRL_KL15
=
1u
;
//KL15
}
/*负控*/
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_02
=
0
;
...
...
@@ -622,10 +630,10 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_09
=
1
;
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
1
;
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
LINE_OUT_POS_04
=
1
;
/*燃油*/
FUEL_RES_1
=
1
;
FUEL_RES_2
=
0
;
...
...
@@ -649,8 +657,8 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_09
=
1
;
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_01
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -676,8 +684,8 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
1
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
FUEL_RES_1
=
0
;
...
...
@@ -703,8 +711,8 @@ void Function_Check_Ctrl(uint32_t cmd)
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
1
;
LINE_OUT_POS_03
=
1
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
FUEL_RES_1
=
0
;
FUEL_RES_2
=
0
;
...
...
@@ -728,7 +736,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
1
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -754,7 +762,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
1
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -780,7 +788,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -806,7 +814,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -832,7 +840,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -858,7 +866,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -884,7 +892,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
1
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -910,7 +918,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_10
=
1
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
1
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
...
...
@@ -946,6 +954,38 @@ void Function_Check_Ctrl(uint32_t cmd)
FUEL_RES_4
=
1
;
break
;
}
case
14
:
{
if
(
resetflag
==
0
)
{
POWER_CTRL_KL30
=
0u
;
//B+
POWER_CTRL_KL15
=
0u
;
//KL15
}
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_02
=
0
;
LINE_OUT_NEG_03
=
0
;
LINE_OUT_NEG_04
=
0
;
LINE_OUT_NEG_05
=
0
;
LINE_OUT_NEG_06
=
0
;
LINE_OUT_NEG_07
=
0
;
LINE_OUT_NEG_08
=
0
;
LINE_OUT_NEG_09
=
0
;
LINE_OUT_NEG_10
=
0
;
/*正控*/
LINE_OUT_POS_01
=
0
;
LINE_OUT_POS_02
=
0
;
LINE_OUT_POS_03
=
0
;
LINE_OUT_POS_04
=
0
;
/*燃油*/
FUEL_RES_1
=
0
;
FUEL_RES_2
=
0
;
FUEL_RES_3
=
0
;
FUEL_RES_4
=
0
;
}
default:
break
;
}
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
9e93071c
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
9e93071c
...
...
@@ -76,7 +76,7 @@ void Buzzer_Stop(void);
extern
void
Buzzer_Init
(
void
);
extern
void
Buzzer_Warning
(
void
);
void
Display_Send_Vspead
(
uint8_t
menu
);
extern
void
Get_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
);
void
GUI_Display_Version_Code_Service
(
uint8_t
StarX
,
uint16_t
PosY
,
uint8_t
*
Str
,
const
uint8_t
*
Version
[]
,
uint8_t
SpaceKeySize
);
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
9e93071c
...
...
@@ -81,13 +81,13 @@
//左转
#define
LINE_OUT_POS_01 GPIO_OUT_PORT10_PIN06
#define
LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
//右转
#define LINE_OUT_POS_0
2 GPIO_OUT_PORT09_PIN00
#define LINE_OUT_POS_0
1 GPIO_OUT_PORT10_PIN06
//远光
#define LINE_OUT_POS_0
3 GPIO_OUT_APORT00_PIN04
#define LINE_OUT_POS_0
2 GPIO_OUT_PORT09_PIN00
//位置灯
#define LINE_OUT_POS_0
4 GPIO_OUT_APORT00_PIN05
#define LINE_OUT_POS_0
3 GPIO_OUT_APORT00_PIN04
#define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06
#define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13
#define LINE_OUT_POS_07 GPIO_OUT_APORT00_PIN14
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
9e93071c
...
...
@@ -43,6 +43,7 @@ void Sys_Run_Mode_2ms_Tasks_Group(void)
Can_Write_Fun
(
2
);
//报文外发
COM_RX_Process
(
);
RTE_ADC_Services
(
);
Get_static_Current
();
}
/*==============================================================================
...
...
@@ -63,8 +64,39 @@ extern uint8_t SWtestresult;
extern
uint8_t
HWtestresult
;
extern
uint8_t
PNtestresult
;
extern
uint8_t
resetflag
;
extern
uint8_t
fuelreset1
;
extern
uint8_t
fuelreset2
;
extern
uint8_t
fuelreset3
;
extern
uint8_t
fuelreset4
;
void
Sys_Run_Mode_10ms_Tasks_Group
(
void
)
{
if
(
MENU_CHECK_STEP
==
1
&&
fuelreset1
==
0
)
{
fuelreset1
=
1
;
}
else
if
(
MENU_CHECK_STEP
==
2
&&
fuelreset2
==
0
)
{
fuelreset2
=
1
;
}
else
if
(
MENU_CHECK_STEP
==
3
&&
fuelreset3
==
0
)
{
fuelreset3
=
1
;
}
else
if
(
MENU_CHECK_STEP
==
4
&&
fuelreset4
==
0
)
{
fuelreset4
=
1
;
}
if
(
MENU_CHECK_STEP
==
0
)
{
fuelreset1
=
0
;
fuelreset2
=
0
;
fuelreset3
=
0
;
fuelreset4
=
0
;
}
if
(
fuelreset1
==
1
||
fuelreset2
==
1
||
fuelreset3
==
1
||
fuelreset4
==
1
)
{
resetpowerfuel
();
}
BusOff_Service
(
);
Key_Service
(
);
...
...
YueJin_test_bench/source/Driver/GPIO/GPIO.c
View file @
9e93071c
...
...
@@ -38,27 +38,27 @@ typedef enum
const
uint16_t
g_u16GPIOConfigArray
[
56U
][
2U
]
=
{
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x5020u
,
0x5020u
},
{
0x0620u
,
0x0620u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x5630u
,
0x5630u
},
{
0x0A6Fu
,
0x0A6Fu
},
{
0x29CFu
,
0x29CFu
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0020u
,
0x0000u
},
{
0x0620u
,
0x0600u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0630u
,
0x0600u
},
{
0x4220u
,
0x2207u
},
{
0x79CFu
,
0x79FFu
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0008u
},
{
0x0000u
,
0x0000u
},
{
0x1FFFu
,
0x1FFFu
},
{
0x0000u
,
0x0003u
},
{
0x0000u
,
0x0008u
},
{
0x0000u
,
0x0008u
},
{
0x1FFFu
,
0x1FF7u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
...
...
@@ -72,27 +72,27 @@ const uint16_t g_u16GPIOConfigArray[56U][2U] =
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x8000u
,
0x8000u
},
{
0x8000u
,
0x8000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x8000u
,
0x8000u
},
{
0x0020u
,
0x0000u
},
{
0x7FFFu
,
0x7FFFu
},
{
0x0000u
,
0x0000u
},
{
0x8800u
,
0x0000u
},
{
0x8800u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0001u
,
0x0001u
},
{
0x0001u
,
0x0001u
},
{
0x0004u
,
0x0200u
},
{
0x8800u
,
0x0000u
},
{
0x8020u
,
0x0000u
},
{
0x77FFu
,
0xFFFFu
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x0001u
,
0x0001u
},
{
0x0005u
,
0x0000u
},
{
0x0005u
,
0x0000u
},
{
0x0000u
,
0x0000u
},
{
0x00FEu
,
0x00FEu
},
{
0x0000u
,
0x0000u
},
{
0x000Fu
,
0x0200u
},
{
0x0000u
,
0x0080u
},
{
0x0005u
,
0x0000u
},
{
0x0001u
,
0x0005u
},
{
0x00FAu
,
0x00FFu
},
{
0x8080u
,
0x1000u
},
{
0x000Fu
,
0x673Fu
},
{
0xFFFFu
,
0xFFFFu
},
};
static
void
GPIO_PIN_Init
(
GPIO_Config_Mode_en_t
enGPIOConfigMode
)
...
...
YueJin_test_bench/source/Driver/GPIO/TM035HFZGZx.c
View file @
9e93071c
...
...
@@ -38,7 +38,7 @@ void LCD_Init(void)
Sim_8080_Data_Write
(
0x0C
);
Sim_8080_Data_Write
(
0x26
);
Sim_8080_Command_Write
(
0x21
);
Sim_8080_Data_Write
(
0x0
0
);
//翻转,正反面翻转 00 01
Sim_8080_Data_Write
(
0x0
1
);
//翻转,正反面翻转 00 01
Sim_8080_Data_Write
(
0xA5
);
Sim_8080_Data_Write
(
0xA5
);
Sim_8080_Data_Write
(
0xA5
);
...
...
@@ -58,7 +58,7 @@ void LCD_Init(void)
Sim_8080_Data_Write
(
0x00
);
Sim_8080_Data_Write
(
0xA5
);
Sim_8080_Command_Write
(
0xA2
);
Sim_8080_Data_Write
(
0x
1
0
);
//180度翻转;00 10
Sim_8080_Data_Write
(
0x
0
0
);
//180度翻转;00 10
Sim_8080_Data_Write
(
0xA5
);
Sim_8080_Data_Write
(
0xA5
);
Sim_8080_Data_Write
(
0xA5
);
...
...
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