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
1db795da
Commit
1db795da
authored
Jun 05, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:添加转向灯、远光灯、贴图
parent
7d6bd508
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
910 additions
and
451 deletions
+910
-451
settings.json
.vscode/settings.json
+8
-1
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+113
-0
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+70
-0
CAN_Communication_Matrix.c
...test_bench/source/Appliciation/CAN_Communication_Matrix.c
+113
-8
CAN_Communication_Matrix.h
...test_bench/source/Appliciation/CAN_Communication_Matrix.h
+32
-1
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+388
-437
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+22
-1
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+26
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+49
-0
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+7
-1
Task.h
YueJin_test_bench/source/Appliciation/Task.h
+6
-0
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+74
-0
Option.properties
...st_bench/utility/诊断工具1.10.11 x64/Option/Option.properties
+2
-2
No files found.
.vscode/settings.json
View file @
1db795da
...
@@ -55,5 +55,12 @@
...
@@ -55,5 +55,12 @@
"C_Cpp_Runner.useLeakSanitizer"
:
false
,
"C_Cpp_Runner.useLeakSanitizer"
:
false
,
"C_Cpp_Runner.showCompilationTime"
:
false
,
"C_Cpp_Runner.showCompilationTime"
:
false
,
"C_Cpp_Runner.useLinkTimeOptimization"
:
false
,
"C_Cpp_Runner.useLinkTimeOptimization"
:
false
,
"C_Cpp_Runner.msvcSecureNoWarnings"
:
false
"C_Cpp_Runner.msvcSecureNoWarnings"
:
false
,
"files.associations"
:
{
"tft_lcd.h"
:
"c"
,
"can_communication_matrix.h"
:
"c"
,
"display_info.h"
:
"c"
,
"com_can.h"
:
"c"
,
"task.h"
:
"c"
}
}
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
1db795da
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#include "Analog_Signals.h"
#include "Analog_Signals.h"
#include "RSCAN.h"
#include "RSCAN.h"
#include "Key.h"
#include "Key.h"
#include "Display_Info.h"
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
)
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
)
{
{
...
@@ -283,3 +285,114 @@ void Can_Set_Buff_021(uint8_t CopyData [])
...
@@ -283,3 +285,114 @@ void Can_Set_Buff_021(uint8_t CopyData [])
pCANMsg
->
Sig
.
Battery_temp
=
1
;
pCANMsg
->
Sig
.
Battery_temp
=
1
;
}
}
}
}
//NFC
void
Can_Set_Buff_284
(
uint8_t
CopyData
[])
{
uint8_t
i
=
0u
;
uint32_t
wtemp
=
0u
;
CANMsg284Union
*
pCANMsg
;
pCANMsg
=
(
CANMsg284Union
*
)
CopyData
;
if
(
pCANMsg
!=
(
void
*
)
0
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
NFC_C_card
==
1
)
{
pCANMsg
->
Sig
.
NFC_C_card
=
1
;
//Display_Can_Receive_Data(20,240);
}
else
if
((
NFC_C_card
==
2
))
{
pCANMsg
->
Sig
.
NFC_C_card
=
2
;
}
}
/*软件版本号*/
extern
uint8_t
Data_786_1
[
8
]
=
{
0x03
,
0x22
,
0x10
,
0x24
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_2
[
8
]
=
{
0x30
,
0x00
,
0x00
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
/*硬件版本号*/
extern
uint8_t
Data_786_3
[
8
]
=
{
0x03
,
0x22
,
0xF1
,
0x93
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_4
[
8
]
=
{
0x30
,
0x00
,
0x00
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
typedef
struct
{
uint8_t
CANruanjian_ID1
;
uint8_t
CANruanjian_ID2
;
uint8_t
CANruanjian_ID3
;
uint8_t
CANruanjian_ID4
;
uint8_t
CANruanjian_ID5
;
uint8_t
CANruanjian_ID1_
;
uint8_t
CANruanjian_ID2_
;
uint8_t
CANruanjian_ID3_
;
uint8_t
CANruanjian_ID4_
;
uint8_t
CANruanjian_ID5_
;
}
CanData_step
;
CanData_step
CanData_step_
=
{
0
};
void
Can_Set_Buff_786
(
uint8_t
CopyData
[])
{
uint8_t
i
=
0u
;
uint32_t
wtemp
=
0u
;
CANMsg786Union
*
pCANMsg
;
pCANMsg
=
(
CANMsg786Union
*
)
CopyData
;
if
(
pCANMsg
!=
(
void
*
)
0
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
Diagnosis_banbenhao_flag
==
1
)
{
// pCANMsg->Sig.diagnosis0 = 0x03;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_1
[
i
];
}
Diagnosis_banbenhao_flag_
=
1
;
// Get_CAN_CH4_ID_750_Diagnosis_return0();
}
if
(
Diagnosis_banbenhao_flag
==
2
)
{
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_2
[
i
];
}
Diagnosis_banbenhao_flag_
=
2
;
}
else
if
(
Diagnosis_banbenhao_flag
==
3
)
{
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_3
[
i
];
}
Diagnosis_banbenhao_flag_
=
3
;
}
else
if
(
Diagnosis_banbenhao_flag
==
4
)
{
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_4
[
i
];
}
Diagnosis_banbenhao_flag_
=
4
;
}
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
1db795da
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define _CAN_APP_H_
#define _CAN_APP_H_
#include "RSCAN.h"
#include "RSCAN.h"
#include "Display_Info.h"
typedef
union
typedef
union
{
{
...
@@ -174,6 +175,68 @@ typedef union
...
@@ -174,6 +175,68 @@ typedef union
}
Sig
;
}
Sig
;
}
CANMsg021Union
;
}
CANMsg021Union
;
//NFC
// typedef union
// {
// uint8_t Msg [ 8 ];
// struct
// {
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :7;
// uint64_t NFC_C_card:1;
// uint64_t :8;
// uint64_t :8;
// } Sig;
// } CANMsg284Union;
typedef
union
{
uint8_t
Msg
[
8
];
struct
{
uint64_t
NFC_C_card
:
8
;
//uint64_t NFC_C_card:1;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
}
Sig
;
}
CANMsg284Union
;
//诊断
typedef
union
{
uint8_t
Msg
[
8
];
struct
{
uint64_t
diagnosis0
:
8
;
uint64_t
diagnosis1
:
8
;
uint64_t
diagnosis2
:
8
;
uint64_t
diagnosis3
:
8
;
uint64_t
diagnosis4
:
8
;
uint64_t
diagnosis5
:
8
;
uint64_t
diagnosis6
:
8
;
uint64_t
diagnosis7
:
8
;
}
Sig
;
}
CANMsg786Union
;
void
CAN_MSG_COUNTER_PLUS
(
void
);
void
CAN_MSG_COUNTER_PLUS
(
void
);
...
@@ -188,5 +251,12 @@ void Can_Set_Buff_280(uint8_t CopyData []);
...
@@ -188,5 +251,12 @@ void Can_Set_Buff_280(uint8_t CopyData []);
void
Can_Set_Buff_202
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_202
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_001
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_001
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_021
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_021
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_284
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[]);
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return1
();
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return2
();
extern
uint8_t
VSpeed
;
extern
uint8_t
VSpeed
;
#endif
#endif
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.c
View file @
1db795da
#include "CAN_Communication_Matrix.h"
#include "CAN_Communication_Matrix.h"
#include "CAN_APP.h"
#include "CAN_APP.h"
#include "RSCAN.h"
#include "RSCAN.h"
#include "Key.h"
/* 2022/11/19 14:29:55 */
/* 2022/11/19 14:29:55 */
st_CanMsgOp
CAN_CH4_CanMsgOp
;
st_CanMsgOp
CAN_CH4_CanMsgOp
;
st_CanMsgTxOp
CAN_CH4_CanMsgTxOp
;
st_CanMsgTxOp
CAN_CH4_CanMsgTxOp
;
#define CAN_CH4 &CAN_CH4_CanMsgOp
#define CAN_CH4 &CAN_CH4_CanMsgOp
uint8_t
count
=
0
;
const
st_CAN_SendAttribute
CAN_CH4_CANSendAttr
[
CAN_CH4_ID_SEND_TOTAL
]
=
const
st_CAN_SendAttribute
CAN_CH4_CANSendAttr
[
CAN_CH4_ID_SEND_TOTAL
]
=
{
{
...
@@ -18,6 +20,8 @@ const st_CAN_SendAttribute CAN_CH4_CANSendAttr[CAN_CH4_ID_SEND_TOTAL] =
...
@@ -18,6 +20,8 @@ const st_CAN_SendAttribute CAN_CH4_CANSendAttr[CAN_CH4_ID_SEND_TOTAL] =
{
0x202
,
100ul
*
1000ul
,
35ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_10
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_202
,
(
void
*
)
0
},
//档位,续航里程,ready
{
0x202
,
100ul
*
1000ul
,
35ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_10
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_202
,
(
void
*
)
0
},
//档位,续航里程,ready
{
0x001
,
100ul
*
1000ul
,
40ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_11
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_001
,
(
void
*
)
0
},
//电机过热
{
0x001
,
100ul
*
1000ul
,
40ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_11
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_001
,
(
void
*
)
0
},
//电机过热
{
0x021
,
100ul
*
1000ul
,
45ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_12
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_021
,
(
void
*
)
0
},
//电池过热
{
0x021
,
100ul
*
1000ul
,
45ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_12
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_021
,
(
void
*
)
0
},
//电池过热
{
0x284
,
100ul
*
1000ul
,
50ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_13
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_284
,
(
void
*
)
0
},
//NFC
{
0x786
,
100ul
*
1000ul
,
55ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_14
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_786
,
(
void
*
)
0
},
//诊断
};
};
const
st_CANMsgAttribute
CAN_CH4_CAN_MSG_CONST_ARRAY
[
CAN_CH4_ID_TOTAL_MAX
]
=
const
st_CANMsgAttribute
CAN_CH4_CAN_MSG_CONST_ARRAY
[
CAN_CH4_ID_TOTAL_MAX
]
=
...
@@ -47,7 +51,17 @@ const st_CANMsgAttribute CAN_CH4_CAN_MSG_CONST_ARRAY[CAN_CH4_ID_TOTAL_MAX] =
...
@@ -47,7 +51,17 @@ const st_CANMsgAttribute CAN_CH4_CAN_MSG_CONST_ARRAY[CAN_CH4_ID_TOTAL_MAX] =
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
5000ul
,
5000ul
,
0x45l
,
0x451ul
,
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
},
{
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
5000ul
,
0x750ul
,
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
...
@@ -60,16 +74,18 @@ uint8_t Co_Can_ConvertSubID_CAN_CH4(uint32_t MsgID)
...
@@ -60,16 +74,18 @@ uint8_t Co_Can_ConvertSubID_CAN_CH4(uint32_t MsgID)
uint8_t
u8Result
=
CAN_CH4_ID_TOTAL_MAX
;
uint8_t
u8Result
=
CAN_CH4_ID_TOTAL_MAX
;
switch
(
MsgID
)
switch
(
MsgID
)
{
{
case
CAN_CH4_ID_250_Msg
_Count
:
case
CAN_CH4_ID_250_Msg
:
u8Result
=
CAN_CH4_ID_250_Msg
;
u8Result
=
CAN_CH4_ID_250_Msg
_Count
;
break
;
break
;
case
CAN_CH4_ID_450_Msg
_Count
:
case
CAN_CH4_ID_450_Msg
:
u8Result
=
CAN_CH4_ID_450_Msg
;
u8Result
=
CAN_CH4_ID_450_Msg
_Count
;
break
;
break
;
case
CAN_CH4_ID_451_Msg_Count
:
case
CAN_CH4_ID_451_Msg
:
u8Result
=
CAN_CH4_ID_451_Msg
;
u8Result
=
CAN_CH4_ID_451_Msg_Count
;
break
;
case
CAN_CH4_ID_750_Msg
:
u8Result
=
CAN_CH4_ID_750_Msg_Count
;
break
;
break
;
default
:
default
:
u8Result
=
CAN_CH4_ID_TOTAL_MAX
;
u8Result
=
CAN_CH4_ID_TOTAL_MAX
;
break
;
break
;
...
@@ -77,3 +93,92 @@ uint8_t Co_Can_ConvertSubID_CAN_CH4(uint32_t MsgID)
...
@@ -77,3 +93,92 @@ uint8_t Co_Can_ConvertSubID_CAN_CH4(uint32_t MsgID)
return
u8Result
;
return
u8Result
;
}
}
//TCS模式设置
uint8_t
Get_CAN_CH4_ID_250_TCS
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_250_Msg_Count
,
0u
)
>>
5u
)));
}
//小计
uint8_t
Get_CAN_CH4_ID_450_Trip
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_450_Msg_Count
,
7u
)
>>
0u
)
&
0xFFu
));
}
//总计
uint8_t
Get_CAN_CH4_ID_450_Mileage
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_450_Msg_Count
,
3u
)
>>
0u
)
&
0xFFu
));
}
//诊断返回信息1_3
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_5
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
5u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_6
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
6u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_7
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
7u
)
>>
0u
)
&
0xFFu
));
}
//诊断返回信息2_7
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_1
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
1u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_2
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
2u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_3
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
3u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_4
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
4u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_5
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
5u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_6
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
6u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_7
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
7u
)
>>
0u
)
&
0xFFu
));
}
//诊断返回信息3_3
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_1
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
1u
)
>>
0u
)
&
0xFFu
));
// 读取CAN通道4,ID为750的消息的字节5
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_2
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
2u
)
>>
0u
)
&
0xFFu
));
}
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_3
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH4
,
CAN_CH4_ID_750_Msg_Count
,
3u
)
>>
0u
)
&
0xFFu
));
}
void
Can_ID_750_Receive
(
uint8_t
CopyData
[])
{
Get_CAN_CH4_ID_750_Diagnosis_return1
();
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.h
View file @
1db795da
...
@@ -7,13 +7,14 @@
...
@@ -7,13 +7,14 @@
extern
st_CanMsgOp
CAN_CH4_CanMsgOp
;
extern
st_CanMsgOp
CAN_CH4_CanMsgOp
;
extern
st_CanMsgTxOp
CAN_CH4_CanMsgTxOp
;
extern
st_CanMsgTxOp
CAN_CH4_CanMsgTxOp
;
extern
uint8_t
count
;
typedef
enum
typedef
enum
{
{
CAN_CH4_ID_250_Msg_Count
,
CAN_CH4_ID_250_Msg_Count
,
CAN_CH4_ID_450_Msg_Count
,
CAN_CH4_ID_450_Msg_Count
,
CAN_CH4_ID_451_Msg_Count
,
CAN_CH4_ID_451_Msg_Count
,
CAN_CH4_ID_750_Msg_Count
,
CAN_CH4_ID_TOTAL_MAX
,
CAN_CH4_ID_TOTAL_MAX
,
}
CAN_CH4_CAN_MSG_ID_t
;
}
CAN_CH4_CAN_MSG_ID_t
;
...
@@ -28,6 +29,8 @@ typedef enum
...
@@ -28,6 +29,8 @@ typedef enum
CAN_CH4_ID_202
,
CAN_CH4_ID_202
,
CAN_CH4_ID_001
,
CAN_CH4_ID_001
,
CAN_CH4_ID_021
,
CAN_CH4_ID_021
,
CAN_CH4_ID_284
,
CAN_CH4_ID_786
,
CAN_CH4_ID_SEND_TOTAL
,
CAN_CH4_ID_SEND_TOTAL
,
}
CAN_CH4_CAN_MSG_SEND_ID_t
;
}
CAN_CH4_CAN_MSG_SEND_ID_t
;
...
@@ -35,9 +38,37 @@ typedef enum
...
@@ -35,9 +38,37 @@ typedef enum
extern
const
st_CANMsgAttribute
CAN_CH4_CAN_MSG_CONST_ARRAY
[
CAN_CH4_ID_TOTAL_MAX
]
;
extern
const
st_CANMsgAttribute
CAN_CH4_CAN_MSG_CONST_ARRAY
[
CAN_CH4_ID_TOTAL_MAX
]
;
extern
const
st_CAN_SendAttribute
CAN_CH4_CANSendAttr
[
CAN_CH4_ID_SEND_TOTAL
]
;
extern
const
st_CAN_SendAttribute
CAN_CH4_CANSendAttr
[
CAN_CH4_ID_SEND_TOTAL
]
;
//小计
extern
uint8_t
Get_CAN_CH4_ID_450_Trip
(
void
);
//TCS模式设置
extern
uint8_t
Get_CAN_CH4_ID_250_TCS
(
void
);
//总计
extern
uint8_t
Get_CAN_CH4_ID_450_Mileage
(
void
);
//诊断返回信息1
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_5
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_6
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return750_1_7
(
void
);
//诊断返回信息2_7
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_1
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_2
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_3
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_4
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_5
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_6
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return2_7
(
void
);
//诊断返回信息3_3
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_1
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_2
(
void
);
uint8_t
Get_CAN_CH4_ID_750_Diagnosis_return3_3
(
void
);
static
void
Can_ID_750_Receive
();
#define CAN_CH4_ID_250_Msg 0x250u
#define CAN_CH4_ID_250_Msg 0x250u
#define CAN_CH4_ID_450_Msg 0x450u
#define CAN_CH4_ID_450_Msg 0x450u
#define CAN_CH4_ID_451_Msg 0x451u
#define CAN_CH4_ID_451_Msg 0x451u
#define CAN_CH4_ID_750_Msg 0x750u
extern
uint8_t
Co_Can_ConvertSubID_CAN_CH4
(
uint32_t
MsgID
);
extern
uint8_t
Co_Can_ConvertSubID_CAN_CH4
(
uint32_t
MsgID
);
#endif
#endif
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
1db795da
...
@@ -13,12 +13,29 @@
...
@@ -13,12 +13,29 @@
#include "FreIn_User.h"
#include "FreIn_User.h"
#include "Key.h"
#include "Key.h"
#include "CAN_APP.h"
#include "CAN_APP.h"
#include "Task.h"
// clang-format off
// clang-format off
uint32_t
Display_Menu_Type
;
uint32_t
Display_Menu_Type
;
uint32_t
Page_Refresh
=
1
;
uint32_t
Page_Refresh
=
1
;
uint32_t
PageNum_history
=
0xff
;
uint32_t
PageNum_history
=
0xff
;
uint16_t
Fuel_Res
;
uint16_t
Fuel_Res
;
uint32_t
loc_Current_0
=
0
;
uint32_t
loc_Current_0
=
0
;
Learning_Card
learning_card
=
{
.
going
=
{
17
,
25
,
19
,
24
,
17
},
.
succeed
=
{
29
,
31
,
13
,
13
,
15
,
15
,
14
},
.
fail
=
{
16
,
11
,
19
,
22
},
.
sameID
=
{
29
,
11
,
23
,
15
,
10
,
19
,
14
}
};
uint8_t
canData_banben
[
14
];
uint16_t
decimal_candata
[
14
];
uint8_t
canData1
[
8
];
uint8_t
canData2
[
14
];
uint8_t
canData3
[
10
];
uint8_t
canData4
[
8
];
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
,};
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
,};
const
unsigned
char
gImage_dui11
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
const
unsigned
char
gImage_dui11
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
//const uint16_t BackLightDigitNum09PosX[] = {30*9, 30*8, 30*7, 30*6, 30*5, 30*4, 30*3, 30*2, 30*1, 30*0};
//const uint16_t BackLightDigitNum09PosX[] = {30*9, 30*8, 30*7, 30*6, 30*5, 30*4, 30*3, 30*2, 30*1, 30*0};
...
@@ -2442,34 +2459,34 @@ const unsigned char *FONT_TABLE_15 [] = {
...
@@ -2442,34 +2459,34 @@ const unsigned char *FONT_TABLE_15 [] = {
gImage_Number_15_white_6X0_Y0
,
gImage_Number_15_white_6X0_Y0
,
gImage_Number_15_white_7X0_Y0
,
gImage_Number_15_white_7X0_Y0
,
gImage_Number_15_white_8X0_Y0
,
gImage_Number_15_white_8X0_Y0
,
gImage_Number_15_white_9X0_Y0
,
gImage_Number_15_white_9X0_Y0
,
//9
NO_HENG
,
NO_HENG
,
//10
gImage_Number_15_white_AX0_Y0
,
gImage_Number_15_white_AX0_Y0
,
//11
gImage_Number_15_white_BX0_Y0
,
gImage_Number_15_white_BX0_Y0
,
//12
gImage_Number_15_white_CX0_Y0
,
gImage_Number_15_white_CX0_Y0
,
//13
gImage_Number_15_white_DX0_Y0
,
gImage_Number_15_white_DX0_Y0
,
gImage_Number_15_white_EX0_Y0
,
gImage_Number_15_white_EX0_Y0
,
gImage_Number_15_white_FX0_Y0
,
gImage_Number_15_white_FX0_Y0
,
gImage_Number_15_white_GX0_Y0
,
gImage_Number_15_white_GX0_Y0
,
//17
gImage_Number_15_white_HX0_Y0
,
gImage_Number_15_white_HX0_Y0
,
gImage_Number_15_white_IX0_Y0
,
gImage_Number_15_white_IX0_Y0
,
gImage_Number_15_white_JX0_Y0
,
gImage_Number_15_white_JX0_Y0
,
gImage_Number_15_white_KX0_Y0
,
gImage_Number_15_white_KX0_Y0
,
//21
gImage_Number_15_white_LX0_Y0
,
gImage_Number_15_white_LX0_Y0
,
gImage_Number_15_white_MX0_Y0
,
gImage_Number_15_white_MX0_Y0
,
gImage_Number_15_white_NX0_Y0
,
gImage_Number_15_white_NX0_Y0
,
//24
gImage_Number_15_white_OX0_Y0
,
gImage_Number_15_white_OX0_Y0
,
gImage_Number_15_white_PX0_Y0
,
gImage_Number_15_white_PX0_Y0
,
gImage_Number_15_white_QX0_Y0
,
gImage_Number_15_white_QX0_Y0
,
gImage_Number_15_white_RX0_Y0
,
gImage_Number_15_white_RX0_Y0
,
//28
gImage_Number_15_white_SX0_Y0
,
gImage_Number_15_white_SX0_Y0
,
gImage_Number_15_white_TX0_Y0
,
gImage_Number_15_white_TX0_Y0
,
gImage_Number_15_white_UX0_Y0
,
gImage_Number_15_white_UX0_Y0
,
gImage_Number_15_white_VX0_Y0
,
gImage_Number_15_white_VX0_Y0
,
//32
gImage_Number_15_white_WX0_Y0
,
gImage_Number_15_white_WX0_Y0
,
gImage_Number_15_white_XX0_Y0
,
gImage_Number_15_white_XX0_Y0
,
gImage_Number_15_white_YX0_Y0
,
gImage_Number_15_white_YX0_Y0
,
gImage_Number_15_white_ZX0_Y0
,
gImage_Number_15_white_ZX0_Y0
,
//36
gImage_Number_15_white_PiontX0_Y0
,
gImage_Number_15_white_PiontX0_Y0
,
gImage_cuo
,
gImage_cuo
,
gImage_dui
,
gImage_dui
,
...
@@ -2604,6 +2621,10 @@ uint8_t ConverToFont(uint8_t input)
...
@@ -2604,6 +2621,10 @@ uint8_t ConverToFont(uint8_t input)
{
{
Ret
=
em_C
;
Ret
=
em_C
;
}
}
else
if
(
input
==
0X20
)
{
Ret
=
em_V
;
}
else
if
(
input
==
0
)
else
if
(
input
==
0
)
{
{
Ret
=
em_0
;
Ret
=
em_0
;
...
@@ -2679,6 +2700,15 @@ void GeneralInfoDisp(uint8_t *p, uint16_t x, uint16_t y)
...
@@ -2679,6 +2700,15 @@ void GeneralInfoDisp(uint8_t *p, uint16_t x, uint16_t y)
}
}
}
}
/**
* @brief 显示一串通用数字
*
* 该函数在TFT液晶屏上显示一串由指针p指向的数字,从指定的坐标(x, y)开始显示。
*
* @param p 指向待显示数字的指针,每个数字以单字节形式存储,以0XFF作为字符串的结束标志。
* @param x 数字串开始显示的横坐标。
* @param y 数字串开始显示的纵坐标。
*/
void
General_Number_Disp
(
uint8_t
*
p
,
uint16_t
x
,
uint16_t
y
)
void
General_Number_Disp
(
uint8_t
*
p
,
uint16_t
x
,
uint16_t
y
)
{
{
uint8_t
i
;
uint8_t
i
;
...
@@ -2699,8 +2729,6 @@ void General_Number_Disp(uint8_t *p, uint16_t x, uint16_t y)
...
@@ -2699,8 +2729,6 @@ void General_Number_Disp(uint8_t *p, uint16_t x, uint16_t y)
TFT_LCD_Draw_Bmp
(
x
,
y
,
(
uint8_t
*
)
FONT_TABLE_15
[
loc_ret
]);
TFT_LCD_Draw_Bmp
(
x
,
y
,
(
uint8_t
*
)
FONT_TABLE_15
[
loc_ret
]);
x
=
FONT_TABLE_15
[
loc_ret
][
0
]
+
x
+
2
;
// x坐标递增
x
=
FONT_TABLE_15
[
loc_ret
][
0
]
+
x
+
2
;
// x坐标递增
i
++
;
i
++
;
}
}
}
}
...
@@ -2782,6 +2810,14 @@ void GUI_General_Digit_Display(uint32_t Digit, const uint8_t *Font[], uint8_t Le
...
@@ -2782,6 +2810,14 @@ void GUI_General_Digit_Display(uint32_t Digit, const uint8_t *Font[], uint8_t Le
//根据传入的字符计算出在数组中的索引号
//根据传入的字符计算出在数组中的索引号
/**
* @brief 根据字符获取对应的索引值
*
* 根据传入的字符,返回其在特定字符集中的索引值。支持的字符包括大写字母、小写字母、数字、特殊字符('/'、''、'@'、'-')。
*
* @param character 输入的字符
* @return 字符在字符集中的索引值
*/
uint8_t
GUI_Display_Get_Index
(
uint8_t
character
)
uint8_t
GUI_Display_Get_Index
(
uint8_t
character
)
{
{
uint8_t
Index
=
0
;
uint8_t
Index
=
0
;
...
@@ -2920,12 +2956,16 @@ uint16_t Version = 100;
...
@@ -2920,12 +2956,16 @@ uint16_t Version = 100;
void
Display_PageNum
(
void
)
void
Display_PageNum
(
void
)
{
{
Clear_TFT_Time
+=
100
;
Clear_TFT_Time
+=
100
;
if
(
Clear_TFT_Time
>=
10
00
)
if
(
Clear_TFT_Time
>=
5
00
)
{
{
Clear_TFT_Time
=
0
;
Clear_TFT_Time
=
0
;
Display_TFT_Clear
(
);
TFT_LCD_Draw_Box
(
170
,
20
,
223
,
45
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
if
(
All_Flag
.
u8flag
[
4
]
==
1
)
{
Display_Num
(
200
,
20
,
Check_Steps
,
100
);
//步骤
Display_Num
(
200
,
20
,
Check_Steps
,
100
);
//步骤
Display_Num
(
20
,
280
,
Version
,
100
);
//步骤
}
//Display_Num(20,280,Version,100);//版本号
}
}
...
@@ -3714,17 +3754,18 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -3714,17 +3754,18 @@ void Display_Version_Info(uint32_t ON_OFF)
if
(
loc_Type_back
!=
loc_Type
)
if
(
loc_Type_back
!=
loc_Type
)
{
{
Display_TFT_Clear
();
//
Display_TFT_Clear();
loc_Type_back
=
loc_Type
;
loc_Type_back
=
loc_Type
;
}
}
TFT_LCD_Draw_Bmp
(
3
,
25
,
(
uint8_t
*
)
gImage_Dyy_words_1X6_Y16
);
//软件版本号
// uint8_t mbuffruanjian[2] = {R485_ID48h.Sig.MCUMainSoftwareVer,0xff};
// uint8_t mbuffruanjian[2] = {R485_ID48h.Sig.MCUMainSoftwareVer,0xff};
uint8_t
banbenhao
=
R485_ID48h
.
Sig
.
MCUMainSoftwareVer
;
uint8_t
banbenhao
=
R485_ID48h
.
Sig
.
MCUMainSoftwareVer
;
uint8_t
esp32banben
[
3
]
=
{
R485_ID4Dh
.
Sig
.
ESP322
,
0x2E
,
0xff
};
uint8_t
esp32banben
[
3
]
=
{
R485_ID4Dh
.
Sig
.
ESP322
,
0x2E
,
0xff
};
uint8_t
esp32houmian
=
R485_ID4Dh
.
Sig
.
ESP321
;
uint8_t
esp32houmian
=
R485_ID4Dh
.
Sig
.
ESP321
;
// uint8_t esp32houmian = 0xA;
// uint8_t esp32houmian = 0xA;
General_Number_Disp
(
esp32banben
,
5
,
50
);
//
General_Number_Disp(esp32banben, 5, 50);
GUI_General_Digit_Display
(
esp32houmian
,
Num_15
,
2
,
0
,
banebenhao1
,
50
);
GUI_General_Digit_Display
(
esp32houmian
,
Num_15
,
2
,
0
,
banebenhao1
,
50
);
uint8_t
mbuffruanjian
[
3
]
=
{
R485_ID48h
.
Sig
.
MCUMainSoftwareVer
,
0x2E
,
0xff
};
uint8_t
mbuffruanjian
[
3
]
=
{
R485_ID48h
.
Sig
.
MCUMainSoftwareVer
,
0x2E
,
0xff
};
uint8_t
wifihoumian
=
R485_ID48h
.
Sig
.
MCUSecSoftwareVer
;
uint8_t
wifihoumian
=
R485_ID48h
.
Sig
.
MCUSecSoftwareVer
;
...
@@ -3783,63 +3824,63 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -3783,63 +3824,63 @@ void Display_Version_Info(uint32_t ON_OFF)
TFT_LCD_Draw_Bmp
(
3
,
50
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
3
,
50
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
0
,
70
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y75
);
//零件号
TFT_LCD_Draw_Bmp
(
0
,
70
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y75
);
//零件号
TFT_LCD_Draw_Bmp
(
3
,
90
+
30
+
30
,
(
uint8_t
*
)
gImage_gImage_dianyuanwaifX6_Y165
);
//仪表电电源检测外发对比检验
// TFT_LCD_Draw_Bmp(3, 90+30+30, ( uint8_t * )gImage_gImage_dianyuanwaifX6_Y165 ); //仪表电电源检测外发对比检验
if
(
powerstdio
==
1
)
// if(powerstdio == 1)
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
+
30
,
(
uint8_t
*
)
gImage_cuo
);
//仪表电电源检测外发对比检验 错
// TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_cuo ); //仪表电电源检测外发对比检验 错
}
// }
else
// else
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
+
30
,
(
uint8_t
*
)
gImage_dui
);
//仪表电电源检测外发对比检验 对
// TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_dui ); //仪表电电源检测外发对比检验 对
}
// }
TFT_LCD_Draw_Bmp
(
3
,
90
+
25
+
25
+
35
+
30
,
(
uint8_t
*
)
gImage_gImage_yibiaowaif1X6_Y16
);
//仪表外发对比检验
// TFT_LCD_Draw_Bmp(3, 90+25+25+35+30, ( uint8_t * )gImage_gImage_yibiaowaif1X6_Y16 ); //仪表外发对比检验
if
(
checknumwrong
==
1
)
// if(checknumwrong == 1)
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
35
+
30
,
(
uint8_t
*
)
gImage_cuo
);
//仪表外发对比检验 错
// TFT_LCD_Draw_Bmp(200, 90+25+25+35+30, ( uint8_t * )gImage_cuo ); //仪表外发对比检验 错
}
// }
else
if
(
checknumwrong
==
0
)
// else if(checknumwrong == 0)
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
35
+
30
,
(
uint8_t
*
)
gImage_dui
);
//仪表外发对比检验 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+35+30, ( uint8_t * )gImage_dui ); //仪表外发对比检验 对
}
// }
else
// else
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
35
+
30
,
(
uint8_t
*
)
gImage_dui
);
//仪表外发对比检验 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+35+30, ( uint8_t * )gImage_dui ); //仪表外发对比检验 对
}
// }
if
(
line_stdio
==
0
)
// if(line_stdio == 0)
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
30
+
30
,
(
uint8_t
*
)
gImage_cuo
);
//硬线指示灯外发对比 错
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+30+30, ( uint8_t * )gImage_cuo ); //硬线指示灯外发对比 错
}
// }
else
if
(
line_stdio
==
1
)
// else if(line_stdio == 1)
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
30
+
30
,
(
uint8_t
*
)
gImage_dui
);
//硬线指示灯外发对比 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+30+30, ( uint8_t * )gImage_dui ); //硬线指示灯外发对比 对
}
// }
else
// else
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
30
+
30
,
(
uint8_t
*
)
gImage_dui
);
//硬线指示灯外发对比 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+30+30, ( uint8_t * )gImage_dui ); //硬线指示灯外发对比 对
}
// }
TFT_LCD_Draw_Bmp
(
3
,
90
+
25
+
25
+
30
+
30
+
30
+
5
,
(
uint8_t
*
)
gImage_gImage_LEDwaif1X6_Y16
);
//硬线指示灯外发对比
// TFT_LCD_Draw_Bmp(3, 90+25+25+30+30+30+5, ( uint8_t * )gImage_gImage_LEDwaif1X6_Y16 ); //硬线指示灯外发对比
TFT_LCD_Draw_Bmp
(
3
,
90
+
25
+
25
+
30
+
25
+
30
+
30
+
5
,
(
uint8_t
*
)
gImage_gImage_SV1X6_Y16
);
//软件版本号对比
// TFT_LCD_Draw_Bmp(3, 90+25+25+30+25+30+30+5, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //软件版本号对比
if
((
R485_ID4Dh
.
Sig
.
ESP322
!=
0
)
&&
(
R485_ID4Dh
.
Sig
.
G0312
!=
0
))
// if((R485_ID4Dh.Sig.ESP322 != 0) && ( R485_ID4Dh.Sig.G0312 != 0))
{
// {
if
((
nowbanbenhao
==
R485_ID4Dh
.
Sig
.
ESP322
)
&&
(
nowbanbenhaohoumian
==
R485_ID4Dh
.
Sig
.
ESP321
)
&&
(
nowbanbenhao
==
R485_ID4Dh
.
Sig
.
G0312
)
&&
(
nowbanbenhaohoumian
==
R485_ID4Dh
.
Sig
.
G0311
))
// if((nowbanbenhao == R485_ID4Dh.Sig.ESP322) && (nowbanbenhaohoumian == R485_ID4Dh.Sig.ESP321) && (nowbanbenhao == R485_ID4Dh.Sig.G0312) && (nowbanbenhaohoumian == R485_ID4Dh.Sig.G0311))
{
// {
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_dui
);
//软件版本号对比 对
//firstpowerflag = 2;
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_cuo
);
//软件版本号对比 错
//firstpowerflag = 3;
MENU_CHECK_STEP
=
0
;
//正在调试取消版本号对比 想要取消版本号对比将上方注释掉并解开下方注释即可
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
// firstpowerflag = 2;
// //firstpowerflag = 2;
}
// }
}
// else
else
// {
{
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
MENU_CHECK_STEP
=
0
;
// //firstpowerflag = 3;
}
// MENU_CHECK_STEP = 0;
// //正在调试取消版本号对比 想要取消版本号对比将上方注释掉并解开下方注释即可
// // TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
// // firstpowerflag = 2;
// }
//}
// else
// {
// MENU_CHECK_STEP = 0;
// }
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
// TFT_LCD_Draw_Bmp(3, 90+25+25+25+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //支持扫码功能个
// TFT_LCD_Draw_Bmp(3, 90+25+25+25+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //支持扫码功能个
// TFT_LCD_Draw_Bmp(3, 130, ( uint8_t * )gImage_Dyy_words_4X6_Y107); //供应商编码
// TFT_LCD_Draw_Bmp(3, 130, ( uint8_t * )gImage_Dyy_words_4X6_Y107); //供应商编码
...
@@ -3856,9 +3897,9 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -3856,9 +3897,9 @@ void Display_Version_Info(uint32_t ON_OFF)
//TFT_LCD_Draw_Bmp(3, 280, ( uint8_t * )gImage_Dyy_words_10X6_Y288); //燃油传感器
//TFT_LCD_Draw_Bmp(3, 280, ( uint8_t * )gImage_Dyy_words_10X6_Y288); //燃油传感器
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// 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(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp
(
3
,
290
,
(
uint8_t
*
)
gImage_gImage_checkVX6_Y165
);
//检测台版本号
//
TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t
mbuff
[
4
]
=
{
1
,
1
,
0
,
0xff
};
//
uint8_t mbuff [4] = {1,1,0,0xff};
General_Number_Disp
(
mbuff
,
160
,
290
);
//
General_Number_Disp(mbuff, 160, 290);
}
}
...
@@ -4289,378 +4330,288 @@ void Display_Send_ODO(uint8_t fuel)
...
@@ -4289,378 +4330,288 @@ void Display_Send_ODO(uint8_t fuel)
}
}
extern
uint8_t
test2
[]
=
{
0x01
,
0x02
,
0x03
,
0x04
,
0xE1
,
0xF2
,
0xA3
,
0xB4
};
void
Display_Chaka_Model
(
void
)
{
// TFT_LCD_Draw_Box(20, 40, 140, 160, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
Display_buffer_ID
(
20
,
80
);
Display_buffer_ID
(
20
,
110
);
Display_buffer_ID
(
20
,
140
);
Display_buffer_ID
(
20
,
170
);
Display_buffer_ID
(
20
,
200
);
Display_buffer_ID
(
20
,
230
);
Display_buffer_Data
(
test2
,
60
,
80
);
Display_buffer_Data
(
test2
,
60
,
110
);
Display_buffer_Data
(
test2
,
60
,
140
);
Display_buffer_Data
(
test2
,
60
,
170
);
Display_buffer_Data
(
test2
,
60
,
200
);
Display_buffer_Data
(
test2
,
60
,
230
);
// Display_buffer_Data(test2,60,80);
// Display_buffer_Data(test2,60,110);
// Display_buffer_Data(test2,60,140);
// Display_buffer_ID(20,80);
// Display_buffer_ID(20,110);
// Display_buffer_ID(20,140);
void
Display_Send_Vspead
(
uint8_t
menu
)
}
void
Display_buffer_ID
(
uint16_t
X
,
uint8_t
Y
)
{
TFT_LCD_Draw_Bmp
(
X
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
19
]);
TFT_LCD_Draw_Bmp
(
X
+
10
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
14
]);
}
void
Display_interface_learning_card
(
uint16_t
X
,
uint8_t
Y
)
{
{
// uint8_t fuel_val = 0;
Learning_Card
*
ptr
=
&
learning_card
;
// static uint8_t Type_Clear = 0;
// uint8_t VSpeed_val = 0;
for
(
uint8_t
i
=
0
;
i
<
5
;
i
++
)
// // static uint8_t Type_Clear_FLAG = 0;
{
// if ( (Type_Clear != menu ))
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
going
[
i
]]);
}
for
(
uint8_t
i
=
0
;
i
<
7
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
30
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
succeed
[
i
]]);
}
for
(
uint8_t
i
=
0
;
i
<
4
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
60
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
fail
[
i
]]);
}
for
(
uint8_t
i
=
0
;
i
<
7
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
90
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
sameID
[
i
]]);
}
}
//uint8_t test1[] = {0x01,0x02,0x03,0x0F,0x0A,0x0C,0x0D,0x0E};//原始
//0101EF87FFCB02FF//屏幕显示
void
Display_buffer_Data
(
uint8_t
buffer
[]
,
uint16_t
X
,
uint8_t
Y
)
{
uint8_t
high
[
8
]
=
{};
uint8_t
low
[
8
]
=
{};
uint8_t
x_offset
=
10
;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
high
[
i
]
=
(
buffer
[
i
]
>>
4
)
&
0x0F
;
low
[
i
]
=
buffer
[
i
]
&
0x0F
;
TFT_LCD_Draw_Box
(
X
,
Y
,
(
X
+
i
*
20
),
Y
+
2
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
if
(
high
[
i
]
>=
10
&&
high
[
i
]
<=
36
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
20
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
high
[
i
]
+
1
]);
}
if
(
low
[
i
]
>=
10
&&
low
[
i
]
<=
36
)
{
TFT_LCD_Draw_Bmp
((
X
+
10
)
+
i
*
20
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
low
[
i
]
+
1
]);
}
if
(
high
[
i
]
>=
0
&&
high
[
i
]
<=
9
)
{
TFT_LCD_Draw_Bmp
((
X
+
2
)
+
i
*
20
,
(
Y
+
2
),
(
uint8_t
*
)
FONT_TABLE_15
[
high
[
i
]]);
}
if
(
low
[
i
]
>=
0
&&
low
[
i
]
<=
9
)
{
TFT_LCD_Draw_Bmp
((
X
+
12
)
+
i
*
20
,
(
Y
+
2
),
(
uint8_t
*
)
FONT_TABLE_15
[
low
[
i
]]);
}
}
}
//测试用
void
Display_Can_Data
(
uint8_t
Data
,
uint16_t
X
,
uint8_t
Y
)
{
uint8_t
high
=
0
;
uint8_t
low
=
0
;
uint8_t
x_offset
=
10
;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
high
=
(
Data
>>
4
)
&
0x0F
;
low
=
Data
&
0x0F
;
TFT_LCD_Draw_Box
(
X
,
Y
,
(
X
+
i
*
20
),
Y
+
2
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
if
(
high
>=
10
&&
high
<=
36
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
20
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
high
+
1
]);
}
if
(
low
>=
10
&&
low
<=
36
)
{
TFT_LCD_Draw_Bmp
((
X
+
10
)
+
i
*
20
,
Y
,
(
uint8_t
*
)
FONT_TABLE_15
[
low
+
1
]);
}
if
(
high
>=
0
&&
high
<=
9
)
{
TFT_LCD_Draw_Bmp
((
X
+
2
)
+
i
*
20
,
(
Y
+
2
),
(
uint8_t
*
)
FONT_TABLE_15
[
high
]);
}
if
(
low
>=
0
&&
low
<=
9
)
{
TFT_LCD_Draw_Bmp
((
X
+
12
)
+
i
*
20
,
(
Y
+
2
),
(
uint8_t
*
)
FONT_TABLE_15
[
low
]);
}
}
}
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)
// {
// {
// Type_Clear = menu;
// canData_banben[0] = segment0;
// Display_TFT_Clear();
// }
// }
// if(menu > 0)
// if(segment1!=NULL)
// {
// if(menu < 13 )
// {
// {
// TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dey_words_1X6_Y16);
// canData_banben[1] = segment1;
// TFT_LCD_Draw_Bmp(180, 40, ( uint8_t * )gImage_Dey_words_5X195_Y16);
// TFT_LCD_Draw_Bmp(3, 40+25, ( uint8_t * )gImage_Dey_words_4X6_Y107);
// TFT_LCD_Draw_Bmp(180, 40+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);
// TFT_LCD_Draw_Bmp(3, 40+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_checkComX6_Y165);
// }
// }
// if(segment2!=NULL)
// if(CurrentWrong == 1)
// {
// {
//
MENU_CHECK_STEP = 13
;
//
canData_banben[2] = segment2
;
// }
// }
// else
}
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
;
// }
// }
//
switch (menu
)
//
if(segment4!=NULL
)
// {
// {
// case 1:
// canData_banben[4] = segment4;
// fuel_val = 1;
// }
// VSpeed_val = 0;
// if(segment5!=NULL)
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_Powerlow1X6_Y16);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_READY1X6_Y16);
// TFT_LCD_Draw_Bmp(150, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_LowBean1X6_Y16);
// TFT_LCD_Draw_Bmp(160, 40+25+25+25+25, ( uint8_t * )gImage_gImage_blueX6_Y165);
// TFT_LCD_Draw_Bmp(140, 40+25+25, ( uint8_t * )NO_F);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25, ( uint8_t * )NO_R);
// TFT_LCD_Draw_Bmp(140+18+18, 40+25+25, ( uint8_t * )NO_E);
// TFT_LCD_Draw_Bmp(140+18+18+18, 40+25+25, ( uint8_t * )NO_E);
// // GUI_Display_Version_Code_Service(160, 40+25+25, "FREE", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40, "0", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25, "1", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25, "DM", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_K);
// TFT_LCD_Draw_Bmp(180+18, 40+25+25+25, ( uint8_t * )NO_W);
// GUI_General_Digit_Display(0, Num_15, 6, 5, ODODigitNum09PosX, 40+25+25+25+5);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "Power", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "10kW", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "00-00", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_0);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_0);
// 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_0);
// break;
// case 2:
// TFT_LCD_Draw_Bmp(160, 40+25+25+25+25, ( uint8_t * )gImage_gImage_orange1X6_Y16);
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_turnLeft1X6_Y16);
// TFT_LCD_Draw_Bmp(150, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_highBeanX6_Y165);
// // GUI_Display_Version_Code_Service(160, 40, "11", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25, "15", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 15;
// VSpeed_val = 11;
// // GUI_Display_Version_Code_Service(3, 40+25+25, "DM", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25, ( uint8_t * )NO_S);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25, ( uint8_t * )NO_P);
// TFT_LCD_Draw_Bmp(140+18+18, 40+25+25, ( uint8_t * )NO_O);
// TFT_LCD_Draw_Bmp(140+18+18+18, 40+25+25, ( uint8_t * )NO_R);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25, ( uint8_t * )NO_T);
// // GUI_Display_Version_Code_Service(160, 40+25+25, "SPORT", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "Power", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "50kW", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_K);
// TFT_LCD_Draw_Bmp(180+18, 40+25+25+25, ( uint8_t * )NO_W);
// GUI_General_Digit_Display(50, Num_15, 6, 5, ODODigitNum09PosX, 40+25+25+25+5);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "11-11", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// 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_1);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
// break;
// case 3:
// TFT_LCD_Draw_Bmp(160, 40+25+25+25+25, ( uint8_t * )gImage_gImage_greenX6_Y165);
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_turnRight1X6_Y16);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_AutoX6_Y165);
// // TFT_LCD_Draw_Bmp(150, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_position1X6_Y16);
// // GUI_Display_Version_Code_Service(160, 40, "22", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25, "22", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 22;
// VSpeed_val = 22;
// // GUI_Display_Version_Code_Service(3, 40+25+25, "DM", Letter_Num_11, PCodeText_Space_size);
// 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);
// // GUI_Display_Version_Code_Service(160, 40+25+25, "TTFAR", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "Power", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "100kW", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_K);
// TFT_LCD_Draw_Bmp(180+18, 40+25+25+25, ( uint8_t * )NO_W);
// GUI_General_Digit_Display(100, Num_15, 6, 5, ODODigitNum09PosX, 40+25+25+25+5);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "22-22", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_2);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_2);
// 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_2);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_2);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
// //光感值先注释掉
// // GUI_General_Digit_Display(lightnumber, Num_15, 6, 5, ODODigitNum09PosX, 40+25+25+25+25+25+25+25+25+25);
// if(Light_Out == 0)
// {
// {
// // TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_AutoX6_Y165);
// canData_banben[5] = segment5;
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_dui11 );
// }
// }
//
else
//
if(segment6!=NULL)
// {
// {
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_cuo11 );
// canData_banben[6] = segment6;
// }
// }
// break;
// if(segment7!=NULL)
// case 4:
// TFT_LCD_Draw_Bmp(160,40+25+25+25+25, ( uint8_t * )gImage_gImage_red1X6_Y16);
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_BianchengX6_Y165);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_Alarm_12_xhX6_Y165);
// TFT_LCD_Draw_Bmp(150, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_superT1X6_Y16);
// // GUI_Display_Version_Code_Service(160, 40, "33", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25, "33", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 33;
// VSpeed_val = 33;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "13-33", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_3);
// 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_3);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_3);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
// break;
// case 5:
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_TCS1X6_Y16);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_seattong1X6_Y16);
// // GUI_Display_Version_Code_Service(160, 40+25, "44", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40, "44", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 44;
// VSpeed_val = 44;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "ePower", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "1", Letter_Num_11, PCodeText_Space_size);
// // TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_G);
// // TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_K);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_W);
// TFT_LCD_Draw_Bmp(180+25, 40+25+25+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);
// GUI_Display_Version_Code_Service(155, 40+25+25+25, "-10", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "14-44", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_4);
// 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_4);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_4);
// break;
// case 6:
// // TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_seat1X6_Y16);
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_doupoX6_Y165);
// // GUI_Display_Version_Code_Service(160, 40+25, "55", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40, "55", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 55;
// VSpeed_val = 55;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "ePower", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "5", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_W);
// TFT_LCD_Draw_Bmp(180+25, 40+25+25+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);
// GUI_Display_Version_Code_Service(155, 40+25+25+25, "-50", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "15-55", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_5);
// 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_5);
// TFT_LCD_Draw_Bmp(140+18+18+18+18, 40+25+25+25+25+25, ( uint8_t * )NO_5);
// break;
// case 7:
// 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);
// // GUI_Display_Version_Code_Service(160, 40+25, "66", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40, "66", Letter_Num_11, PCodeText_Space_size);
// fuel_val = 66;
// VSpeed_val = 66;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25, "ePower", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25, "10", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(180, 40+25+25+25, ( uint8_t * )NO_W);
// TFT_LCD_Draw_Bmp(180+25, 40+25+25+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);
// 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+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "16-06", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_6);
// 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:
// 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);
// fuel_val = 77;
// VSpeed_val = 77;
// // 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);
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "17-07", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_7);
// 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_7);
// 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);
// fuel_val = 88;
// VSpeed_val = 88;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "18-08", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_8);
// 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_8);
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_lowPower1X6_Y16);
// break;
// 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);
// fuel_val = 99;
// VSpeed_val = 99;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "19-09", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_1);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_9);
// 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_9);
// GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size);
// break;
// case 11:
// // 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);
// fuel_val = 100;
// VSpeed_val = 99;
// // GUI_Display_Version_Code_Service(3, 40+25+25+25+25+25, "Time", Letter_Num_11, PCodeText_Space_size);
// // GUI_Display_Version_Code_Service(160, 40+25+25+25+25+25, "00-00", Letter_Num_11, PCodeText_Space_size);
// TFT_LCD_Draw_Bmp(140, 40+25+25+25+25+25, ( uint8_t * )NO_0);
// TFT_LCD_Draw_Bmp(140+18, 40+25+25+25+25+25, ( uint8_t * )NO_0);
// 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_0);
// GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size);
// break;
// case 12:
// TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_bluetoothX6_Y165);
// break;
// case 13:
// // POWER_CTRL_KL30 = 0u; //B+
// // POWER_CTRL_KL15 = 0u; //KL15
// CAN_Msg_Tx_Enable = 0u;
// //Diag_Info_Init( );
// //Display_Init( );
// //Display_Version_Info(0);
// //Send_Init();
// //Send_ODO_Init();
// HW_Static_Current_Check(1);
// break;
// case 14:
// GUI_Display_Version_Code_Service(25, 20, "Please enter password ", Letter_Num_11, PCodeText_Space_size);
// break;
// case 15:
// // blename[4] = 0xFF;
// // if((blename[0]+blename[1]+blename[2]+blename[3]) != 0)
// // {
// // General_Number_Disp(blename, 3, 165);
// // }
// memset(blename,0xFF,5);
// Display_TFT_Clear();
// break;
// case 16:
// 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))
// {
// {
//
General_Number_Disp(blename, 110, 150);
//
canData_banben[7] = segment7;
// }
// }
// break;
// if(segment8!=NULL)
// default:
// {
// MENU_CHECK_STEP = 0;
// canData_banben[8] = segment8;
// break;
// }
// }
//
if(menu < 13 && menu != 0
)
//
if(segment9!=NULL
)
// {
// {
// GUI_General_Digit_Display(VSpeed_val, Num_15, 6, 5, ODODigitNum09PosX, 40);
// canData_banben[9] = segment9;
// GUI_General_Digit_Display(fuel_val, Num_15, 6, 5, ODODigitNum09PosX, 40+25);
// }
// }
// // 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;
}
//版本号显示
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
)
{
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
3
]
==
1
)
{
TFT_LCD_Draw_Bmp
(
X
,
Y
,
(
uint8_t
*
)
gImage_Dyy_words_1X6_Y16
);
//软件版本号
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
);
}
}
void
Display_flag
(
uint8_t
Check_Steps
)
{
switch
(
Check_Steps
)
{
case
1
:
//左转、右转、位置灯
TFT_LCD_Draw_Box
(
20
,
40
,
220
,
220
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_turnLeft1X6_Y16
);
TFT_LCD_Draw_Bmp
(
80
,
40
,
(
uint8_t
*
)
gImage_gImage_position1X6_Y16
);
TFT_LCD_Draw_Bmp
(
140
,
40
,
(
uint8_t
*
)
gImage_gImage_turnRight1X6_Y16
);
break
;
case
2
:
//远光\TCS
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_highBeanX6_Y165
);
TFT_LCD_Draw_Bmp
(
80
,
40
,
(
uint8_t
*
)
gImage_gImage_TCS1X6_Y16
);
break
;
case
3
:
//TCS关闭 电池温度过高
//TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_lowPower1X6_Y16);
break
;
case
4
:
//充电连接 ABS
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
80
,
40
,
(
uint8_t
*
)
gImage_gImage_ABSX6_Y165
);
break
;
case
5
:
//能源回收(白) 边撑
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_BianchengX6_Y165
);
break
;
case
6
:
//能源回收(蓝) 定速巡航
break
;
case
7
:
//能源回收(琥珀) READY亮
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_READY1X6_Y16
);
break
;
case
8
:
//故障提示 电机过热 READY闪烁
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_zcguzhang1X6_Y16
);
break
;
case
9
:
//蓝牙 GPS信号格数
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_bluetoothX6_Y165
);
break
;
case
10
:
//蓝牙电话 4G网络格数
break
;
case
11
:
//全亮
TFT_LCD_Draw_Box
(
20
,
40
,
180
,
180
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
//清除全亮
TFT_LCD_Draw_Bmp
(
20
,
40
,
(
uint8_t
*
)
gImage_gImage_turnLeft1X6_Y16
);
TFT_LCD_Draw_Bmp
(
80
,
40
,
(
uint8_t
*
)
gImage_gImage_position1X6_Y16
);
TFT_LCD_Draw_Bmp
(
140
,
40
,
(
uint8_t
*
)
gImage_gImage_turnRight1X6_Y16
);
TFT_LCD_Draw_Bmp
(
20
,
80
,
(
uint8_t
*
)
gImage_gImage_turnLeft1X6_Y16
);
TFT_LCD_Draw_Bmp
(
80
,
80
,
(
uint8_t
*
)
gImage_gImage_highBeanX6_Y165
);
TFT_LCD_Draw_Bmp
(
140
,
80
,
(
uint8_t
*
)
gImage_gImage_TCS1X6_Y16
);
TFT_LCD_Draw_Bmp
(
20
,
120
,
(
uint8_t
*
)
gImage_gImage_ABSX6_Y165
);
TFT_LCD_Draw_Bmp
(
80
,
120
,
(
uint8_t
*
)
gImage_gImage_BianchengX6_Y165
);
TFT_LCD_Draw_Bmp
(
140
,
120
,
(
uint8_t
*
)
gImage_gImage_READY1X6_Y16
);
TFT_LCD_Draw_Bmp
(
20
,
160
,
(
uint8_t
*
)
gImage_gImage_zcguzhang1X6_Y16
);
TFT_LCD_Draw_Bmp
(
80
,
160
,
(
uint8_t
*
)
gImage_gImage_bluetoothX6_Y165
);
break
;
default:
MENU_CHECK_STEP
=
0
;
break
;
}
}
}
...
...
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
1db795da
...
@@ -68,7 +68,15 @@ void Display_Init(void);
...
@@ -68,7 +68,15 @@ void Display_Init(void);
extern
void
Send_ODO_Init
(
void
);
extern
void
Send_ODO_Init
(
void
);
void
Display_Send_ODO
(
uint8_t
fuel
);
void
Display_Send_ODO
(
uint8_t
fuel
);
void
Display_Send_Vspead
(
uint8_t
menu
);
void
Display_flag
(
uint8_t
Check_Steps
);
void
Display_buffer_Data
(
uint8_t
buffer
[]
,
uint16_t
X
,
uint8_t
Y
);
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
);
void
Display_Set_Buff
(
void
);
extern
void
Send_Init
(
void
);
extern
void
Send_Init
(
void
);
...
@@ -97,6 +105,19 @@ extern uint32_t loc_Current_0;
...
@@ -97,6 +105,19 @@ extern uint32_t loc_Current_0;
extern
void
Get_static_Current
(
void
);
extern
void
Get_static_Current
(
void
);
extern
uint32_t
Get_Display_Type
(
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
);
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
[];
extern
const
uint8_t
*
Num_15
[];
typedef
struct
{
uint8_t
going
[
5
];
uint8_t
succeed
[
7
];
uint8_t
fail
[
4
];
uint8_t
sameID
[
7
];
}
Learning_Card
;
// extern uint8_t canData[3][8];
extern
uint8_t
canData2
[
14
];
extern
uint8_t
canData3
[
10
];
extern
uint8_t
canData4
[
8
];
//extern u8_All_Flag_t All_Flag;
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#endif
#endif
YueJin_test_bench/source/Appliciation/Key.h
View file @
1db795da
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define KEY_H__
#define KEY_H__
#include "TYW_stdint.h"
#include "TYW_stdint.h"
#include "Display_Info.h"
#define Check_KeepTime 3000 //每个步骤保持时间
#define Check_KeepTime 3000 //每个步骤保持时间
#define Check_Couont 11 //多少个步骤
#define Check_Couont 11 //多少个步骤
...
@@ -73,6 +74,26 @@ typedef struct
...
@@ -73,6 +74,26 @@ typedef struct
}
Key_Attribute_st_t
;
}
Key_Attribute_st_t
;
typedef
union
{
uint8_t
u8flag
[
8
];
struct
{
uint8_t
u8_SW_2
:
1
;
uint8_t
u8_SW_6
:
1
;
uint8_t
u8_SW_7
:
1
;
uint8_t
u8_SW_8
:
1
;
uint8_t
u8_SW_10
:
1
;
uint8_t
:
3
;
}
KEY_flag
;
}
u8_All_Flag_t
;
/*--------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------*/
extern
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
];
extern
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
];
extern
Key_Real_Status_en_t
enKeyLeftRealStatus
;
extern
Key_Real_Status_en_t
enKeyLeftRealStatus
;
...
@@ -102,7 +123,12 @@ extern uint8_t Cruiste;
...
@@ -102,7 +123,12 @@ extern uint8_t Cruiste;
extern
uint8_t
Fault
;
extern
uint8_t
Fault
;
extern
uint8_t
Motor_hert
;
extern
uint8_t
Motor_hert
;
extern
uint8_t
Battery_temp
;
extern
uint8_t
Battery_temp
;
extern
uint8_t
NFC_C_card
;
extern
u8_All_Flag_t
All_Flag
;
extern
uint8_t
Diagnosis_banbenhao_flag
;
extern
uint8_t
Diagnosis_banbenhao_flag_
;
extern
uint16_t
testtime
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
1db795da
...
@@ -22,6 +22,21 @@ uint8_t Cruiste = 0;
...
@@ -22,6 +22,21 @@ uint8_t Cruiste = 0;
uint8_t
Fault
=
0
;
uint8_t
Fault
=
0
;
uint8_t
Motor_hert
=
0
;
uint8_t
Motor_hert
=
0
;
uint8_t
Battery_temp
=
0
;
uint8_t
Battery_temp
=
0
;
uint8_t
NFC_C_card
=
0
;
uint8_t
Diagnosis_banbenhao_flag
=
0
;
uint8_t
Diagnosis_banbenhao_flag_
=
0
;
uint8_t
key_flag
=
0
;
u8_All_Flag_t
All_Flag
=
{
0
};
// All_Flag.KEY.Key1 = 0;
uint8_t
detection_protect
=
0
;
uint8_t
Key10_Flag
=
0
;
uint8_t
SW_Protect_flag
[
11
]
=
{
0
};
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
{
{
/*清零ODO*/
/*清零ODO*/
...
@@ -51,6 +66,11 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
...
@@ -51,6 +66,11 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
0
]
=
1
;
Display_TFT_Clear
();
Display_Chaka_Model
();
//查卡模式
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -111,6 +131,11 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
...
@@ -111,6 +131,11 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
1
]
=
1
;
Check_Steps
=
0
;
Display_TFT_Clear
();
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
@@ -124,6 +149,12 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
...
@@ -124,6 +149,12 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
2
]
=
1
;
Check_Steps
=
0
;
Display_TFT_Clear
();
//界面学卡:
Display_interface_learning_card
(
20
,
80
);
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -140,6 +171,16 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
...
@@ -140,6 +171,16 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
3
]
=
1
;
Diagnosis_banbenhao_flag
=
1
;
Display_TFT_Clear
();
//版本号界面
//Display_Version_Info(1);
Display_Can_Receive_Data
(
5
,
50
);
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
@@ -188,9 +229,15 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
...
@@ -188,9 +229,15 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
/*清零ODO*/
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
// All_Flag.u8flag[1] = 1;
All_Flag
.
u8flag
[
4
]
=
1
;
if
(
Check_Control_Mode
==
2
)
if
(
Check_Control_Mode
==
2
)
{
if
(((
All_Flag
.
u8flag
[
0
]
==
0
)
&&
(
All_Flag
.
u8flag
[
1
]
==
0
)
&&
(
All_Flag
.
u8flag
[
2
]
==
0
)
&&
((
All_Flag
.
u8flag
[
3
]
==
0
))))
{
{
Check_Steps
++
;
Check_Steps
++
;
Display_flag
(
Check_Steps
);
if
(
Check_Steps
>
Check_Couont
)
if
(
Check_Steps
>
Check_Couont
)
{
{
Check_Steps
=
0
;
Check_Steps
=
0
;
...
@@ -198,6 +245,8 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
...
@@ -198,6 +245,8 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
}
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
}
}
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
1db795da
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
#include "api_RS485.h"
#include "api_RS485.h"
#include "RTE_WDT.h"
#include "RTE_WDT.h"
#include "R485_Communication_Matrix.h"
#include "R485_Communication_Matrix.h"
#include "CAN_Communication_Matrix.h"
#include "CAN_APP.h"
/*******************************************************************************
/*******************************************************************************
* *
* *
* ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� *
* ϵͳ��������ģʽ(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )�����б� *
...
@@ -119,11 +121,15 @@ uint16_t time5s = 0;
...
@@ -119,11 +121,15 @@ uint16_t time5s = 0;
uint16_t
IGFLAG
=
0
;
uint16_t
IGFLAG
=
0
;
uint16_t
testtime
=
0
;
uint16_t
testtime
=
0
;
uint8_t
can_flag
=
100
;
uint8_t
*
pcan_data
=
&
can_flag
;
uint8_t
test
[
10
]
=
{
0x56
,
0x0B
,
0x0C
,
0x0D
,
0x1
,
0x2
,
0x3
,
0x4
,
0x05
,
0xFF
};
void
Sys_Run_Mode_100ms_Tasks_Group
(
void
)
void
Sys_Run_Mode_100ms_Tasks_Group
(
void
)
{
{
Display_PageNum
();
Display_PageNum
();
Display_Send_Vspead
();
User_CheckMode_Service
(
100u
);
User_CheckMode_Service
(
100u
);
//TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dsy_words_1X6_Y16);
//TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dsy_words_1X6_Y16);
POWER_CTRL_KL30
=
1
;
POWER_CTRL_KL30
=
1
;
...
...
YueJin_test_bench/source/Appliciation/Task.h
View file @
1db795da
...
@@ -10,6 +10,12 @@ extern uint32_t bleOFFtoONtime;
...
@@ -10,6 +10,12 @@ extern uint32_t bleOFFtoONtime;
extern
uint8_t
startONfalg
;
extern
uint8_t
startONfalg
;
extern
uint32_t
startIGONtime
;
extern
uint32_t
startIGONtime
;
extern
uint8_t
Openble
[
11
];
extern
uint8_t
Openble
[
11
];
extern
uint8_t
canData_banben
[
14
];
extern
uint16_t
decimal_candata
[
14
];
extern
uint8_t
can_flag
;
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
);
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
);
void
Sys_Run_Mode_2ms_Tasks_Group
(
void
);
void
Sys_Run_Mode_2ms_Tasks_Group
(
void
);
void
Sys_Run_Mode_5ms_Tasks_Group
(
void
);
void
Sys_Run_Mode_5ms_Tasks_Group
(
void
);
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
1db795da
...
@@ -792,6 +792,80 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
...
@@ -792,6 +792,80 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
if
(
g_stRSCAN0Config
.
stRSCANCh4
.
pfnRSCANReadMsgCallBack
)
if
(
g_stRSCAN0Config
.
stRSCANCh4
.
pfnRSCANReadMsgCallBack
)
{
{
g_stRSCAN0Config
.
stRSCANCh4
.
pfnRSCANReadMsgCallBack
(
pstCANFrame
->
u32CANID
,
pstCANFrame
->
u8CANLEN
,
pstCANFrame
->
unCANData
.
u8CANData
);
g_stRSCAN0Config
.
stRSCANCh4
.
pfnRSCANReadMsgCallBack
(
pstCANFrame
->
u32CANID
,
pstCANFrame
->
u8CANLEN
,
pstCANFrame
->
unCANData
.
u8CANData
);
if
(
Diagnosis_banbenhao_flag_
==
1
)
//准备接收第一段数据(软件版本号)
{
if
(
pstCANFrame
->
u32CANID
==
0x750u
)
{
/*第一步*/
canData2
[
0
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
5
];
canData2
[
1
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
6
];
canData2
[
2
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
7
];
}
Diagnosis_banbenhao_flag
=
2
;
}
if
(
Diagnosis_banbenhao_flag_
==
2
)
//准备接收第二段数据(软件版本号)
{
if
(
pstCANFrame
->
u32CANID
==
0x750u
)
{
/*第二步*/
if
((
pstCANFrame
->
unCANData
.
u8CANData
[
0
]
==
0x21
)
&&
(
pstCANFrame
->
unCANData
.
u8CANData
[
1
]
==
0x30
))
{
memcpy
(
canData1
,
pstCANFrame
->
unCANData
.
u8CANData
,
pstCANFrame
->
u8CANLEN
);
}
for
(
uint8_t
i
=
0
;
i
<
7
;
i
++
)
{
canData2
[
i
+
3
]
=
canData1
[
i
+
1
];
}
/*第三步*/
canData2
[
10
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
1
];
canData2
[
11
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
2
];
canData2
[
12
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
3
];
canData2
[
13
]
=
0xFF
;
}
Diagnosis_banbenhao_flag
=
3
;
}
if
(
Diagnosis_banbenhao_flag_
==
3
)
//准备接收数据(硬件版本号)
{
if
(
pstCANFrame
->
u32CANID
==
0x750u
)
{
if
((
pstCANFrame
->
unCANData
.
u8CANData
[
0
]
==
0x10
)
&&
(
pstCANFrame
->
unCANData
.
u8CANData
[
7
]
==
0x46
))
{
memcpy
(
canData1
,
pstCANFrame
->
unCANData
.
u8CANData
,
pstCANFrame
->
u8CANLEN
);
for
(
uint8_t
i
=
0
;
i
<
3
;
i
++
)
{
canData3
[
i
]
=
canData1
[
i
+
5
];
}
}
}
Diagnosis_banbenhao_flag
=
4
;
}
if
(
Diagnosis_banbenhao_flag_
==
4
)
{
if
(
pstCANFrame
->
u32CANID
==
0x750u
)
{
if
((
pstCANFrame
->
unCANData
.
u8CANData
[
0
]
==
0x21
)
&&
(
pstCANFrame
->
unCANData
.
u8CANData
[
7
]
==
0xAA
))
{
memcpy
(
canData4
,
pstCANFrame
->
unCANData
.
u8CANData
,
pstCANFrame
->
u8CANLEN
);
// for (uint8_t i = 0; i < 6; i++)
// {
// canData3[i+3] = canData4[i+2];
// }
canData3
[
3
]
=
canData4
[
1
];
canData3
[
4
]
=
canData4
[
2
];
canData3
[
5
]
=
canData4
[
3
];
canData3
[
6
]
=
canData4
[
4
];
canData3
[
7
]
=
canData4
[
5
];
canData3
[
8
]
=
canData4
[
6
];
canData3
[
9
]
=
0XFF
;
}
}
}
}
}
}
}
void
RSCAN0_CH5_Receive
(
CAN_Frame_st_t
*
pstCANFrame
)
void
RSCAN0_CH5_Receive
(
CAN_Frame_st_t
*
pstCANFrame
)
...
...
YueJin_test_bench/utility/诊断工具1.10.11 x64/Option/Option.properties
View file @
1db795da
#new Option
#new Option
#
Mon Dec 16 20:50:58 CST 2024
#
Thu Jun 05 08:24:11 CST 2025
IsSort
=
true
IsSort
=
true
MergeFlashIsCompression
=
false
MergeFlashIsCompression
=
false
ChangeAppFilePath
=
ChangeAppFilePath
=
...
@@ -31,7 +31,7 @@ IsMergeCreateBin=false
...
@@ -31,7 +31,7 @@ IsMergeCreateBin=false
IsOverWrite
=
true
IsOverWrite
=
true
DllFilePath
=
DllFilePath
=
MergeAudioOutPutPath
=
MergeAudioOutPutPath
=
MergeCanOutPutPath
=
MergeCanOutPutPath
=
D
\:\\
Desktop
\\
jiancetai
ChangeOutPutFilePath
=
ChangeOutPutFilePath
=
MergeTelltalesOutPutPath
=
MergeTelltalesOutPutPath
=
TTFExtractTXTpath
=
TTFExtractTXTpath
=
...
...
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