Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
bdf23998
Commit
bdf23998
authored
May 31, 2022
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加发动机油&滤清器,功能未验证
parent
8eea069c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
76 deletions
+157
-76
CAN_Communication_Matrix.c
...Application/CAN_APP_NM/CAN_App/CAN_Communication_Matrix.c
+23
-13
CAN_Communication_Matrix.h
...Application/CAN_APP_NM/CAN_App/CAN_Communication_Matrix.h
+4
-2
CAN_FUNC.c
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
+4
-0
CAN_FUNC.h
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.h
+1
-1
GUI.c
source/Application/Graphic/GUI/GUI.c
+115
-50
Menu_user.c
source/Application/Graphic/Menu/Menu_user.c
+10
-10
No files found.
source/Application/CAN_APP_NM/CAN_App/CAN_Communication_Matrix.c
View file @
bdf23998
...
...
@@ -404,16 +404,16 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY[ID_TOTAL_MAX] =
((
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,
// 0x18EA0021
ul,
//
(( 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
,
0x18FF3018
ul
,
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
},
{
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
...
...
@@ -996,6 +996,16 @@ uint8_t Get_ID_18FEED00_Sig_Maximum_Vehicle_Speed_Limit(void)
// ((uint32_t)((uint32_t)CAN_MSG_Read(ID_CanMsg18EA0021_Msg_Count, 0u) >> 0u) & 0xFFu));
//}
uint8_t
Get_ID_18FF3018_Sig_Engine_oil_filte
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
ID_CanMsg18FF3018_Msg_Count
,
0u
)
>>
6u
)
&
0x03u
));
}
uint8_t
Get_ID_18FF3018_Sig_Starter
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
ID_CanMsg18FF3018_Msg_Count
,
0u
)
>>
0u
)
&
0x03u
));
}
uint8_t
Get_ID_0C010305_Sig_Auto_EcoPow
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
ID_CanMsg0C010305_Msg_Count
,
5u
)
>>
2u
)
&
0x03u
));
...
...
@@ -1147,9 +1157,9 @@ uint8_t Co_Can_ConvertSubID(uint32_t MsgID)
case
ID_CanMsg18FEED00_Msg
:
u8Result
=
ID_CanMsg18FEED00_Msg_Count
;
break
;
//case ID_CanMsg18EA0021
_Msg:
// u8Result = ID_CanMsg18EA0021
_Msg_Count;
//
break;
case
ID_CanMsg18FF3018
_Msg
:
u8Result
=
ID_CanMsg18FF3018
_Msg_Count
;
break
;
case
ID_CanMsg18021733_Msg
:
u8Result
=
ID_CanMsg18021733_Msg_Count
;
break
;
...
...
source/Application/CAN_APP_NM/CAN_App/CAN_Communication_Matrix.h
View file @
bdf23998
...
...
@@ -44,7 +44,7 @@ typedef enum
/*35*/
ID_CanMsg18FD7C00_Msg_Count
,
/*36*/
ID_CanMsg18FECAE8_Msg_Count
,
/*37*/
ID_CanMsg18FEED00_Msg_Count
,
/*38*/
//ID_CanMsg18EA0021
_Msg_Count,
/*38*/
ID_CanMsg18FF3018
_Msg_Count
,
/*39*/
ID_CanMsg18021733_Msg_Count
,
/*40*/
ID_CanMsg0C010305_Msg_Count
,
/*41*/
ID_CanMsg18FECA2A_Msg_Count
,
...
...
@@ -116,7 +116,7 @@ extern const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] ;
#define ID_CanMsg18FD7C00_Msg 0x18FD7C00u
#define ID_CanMsg18FECAE8_Msg 0x18FECAE8u
#define ID_CanMsg18FEED00_Msg 0x18FEED00u
//#define ID_CanMsg18EA0021_Msg 0x18EA0021
u
#define ID_CanMsg18FF3018_Msg 0x18FF3018
u
#define ID_CanMsg18021733_Msg 0x18021733u
#define ID_CanMsg0C010305_Msg 0x0C010305u
#define ID_CanMsg18FECA2A_Msg 0x18FECA2Au
...
...
@@ -227,6 +227,8 @@ extern uint8_t Get_ID_18FD7C00_Sig_DPF_Lamp_Status_Amber(void);
extern
uint8_t
Get_ID_18FECAE8_Sig_Amber_Warning_Lamp_Status
(
void
);
extern
uint8_t
Get_ID_18FEED00_Sig_Maximum_Vehicle_Speed_Limit
(
void
);
//extern uint32_t Get_ID_18EA0021_Sig_CruiseControl_VehicleSpeedSetup(void);
extern
uint8_t
Get_ID_18FF3018_Sig_Engine_oil_filte
(
void
);
extern
uint8_t
Get_ID_18FF3018_Sig_Starter
(
void
);
extern
uint8_t
Get_ID_0C010305_Sig_Auto_EcoPow
(
void
);
extern
uint32_t
Get_ID_18FECA03_Sig_SPN
(
void
);
extern
uint8_t
Get_ID_18FECA03_Sig_FMI
(
void
);
...
...
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
View file @
bdf23998
...
...
@@ -1325,6 +1325,8 @@ void Drive_Info_IC1_STATUS_Rx(void)
case
0x64
:
User_ECU
.
TripB_Runing
=
Temp
;
break
;
case
0x20
:
User_ECU
.
Engine_Oil
=
Temp
;
case
0x22
:
User_ECU
.
Engine_Surplus
=
Temp
;
break
;
...
...
@@ -1365,6 +1367,8 @@ void Drive_Info_IC1_STATUS_Rx(void)
case
0x64
:
User_ECU
.
TripB_Runing
=
Temp
;
break
;
case
0x20
:
User_ECU
.
Engine_Oil
=
Temp
;
case
0x22
:
User_ECU
.
Engine_Surplus
=
Temp
;
break
;
...
...
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.h
View file @
bdf23998
...
...
@@ -15,8 +15,8 @@ typedef struct
uint32_t
TripB_Fuel_Consume
;
uint32_t
TripB_Idling
;
uint32_t
TripB_Runing
;
uint32_t
Engine_Oil
;
uint32_t
Engine_Surplus
;
uint32_t
Reserved1
;
}
USER_ECU
;
extern
USER_ECU
User_ECU
;
...
...
source/Application/Graphic/GUI/GUI.c
View file @
bdf23998
...
...
@@ -3987,52 +3987,114 @@ void GUI_BG_RepMenu_3_1_Display(uint8_t Mode)
uint32_t
User_Value
=
0u
;
uint8_t
User_FLAG
=
0u
;
uint8_t
Sig_Engine_oil
=
0u
;
uint8_t
Sig_Starter
=
0u
;
uint8_t
CanStatus
=
0u
;
if
(
Mode
==
GUI_DISP_MODE_NORMAL
)
{
User_Value
=
User_App
.
User_FDJYLQQ
;
/*显示数据*/
User_FLAG
=
State_Flag
.
User_FDJYLQQ_FLAG
;
/*显示状态*/
/*发动机油&滤清器*/
/*User_ECU.Engine_Oil*/
/*User_App.User_FDJYLQQ = User_ECU.Engine_Oil;*/
Sig_Engine_oil
=
Get_ID_18FF3018_Sig_Engine_oil_filte
();
/*78*/
Sig_Starter
=
Get_ID_18FF3018_Sig_Starter
();
/*12*/
CanStatus
=
CAN_MSG_Status
(
ID_CanMsg18EF1718_Msg_Count
);
if
(
User_Value
>
0u
)
User_Value
=
User_ECU
.
Engine_Oil
;
/*显示数据*/
if
(
Sig_Engine_oil
)
{
if
(
User_Value
>
999u
)
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*距离更换*/
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_ERROR
,
GUI_BLENDMODE_SRC_OVER
);
/*error*/
}
else
{
if
(
Sig_Engine_oil
==
1u
)
/*事前报警*/
{
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*
距离
更换*/
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*
请
更换*/
//if (User_Value > 1000)
//{
// GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_12, GUI_BLENDMODE_SRC_OVER); /*距离更换*/
//}
//else
//{
// GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_14, GUI_BLENDMODE_SRC_OVER); /*即将更换*/
//}
GUI_General_Digit_Display
(
MENU_Sprite
,
User_Value
,
Nb_15_0
,
6u
,
5u
,
GUI_REP1_X
,
277u
,
GUI_BLENDMODE_SRC_OVER
);
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_douhao
,
534u
,
281u
,
GUI_BLENDMODE_SRC_OVER
);
/*逗号*/
if
(
User_Value
>=
1000u
)
{
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_douhao
,
534u
,
281u
,
GUI_BLENDMODE_SRC_OVER
);
/*逗号*/
}
else
{
GUI_General_Display
(
MENU_Sprite
,
SpriteSize
,
GUI_BLENDMODE_SRC_OVER
);
}
}
else
else
if
((
Sig_Engine_oil
==
0u
)
&&
(
Sig_Starter
==
0u
))
/*无报警*/
{
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*请更换*/
GUI_General_Display
(
MENU_Sprite
,
SpriteSize
,
GUI_BLENDMODE_SRC_OVER
);
}
GUI_General_Digit_Display
(
MENU_Sprite
,
User_Value
,
Nb_15_0
,
6u
,
5u
,
GUI_REP1_X
,
277u
,
GUI_BLENDMODE_SRC_OVER
);
}
else
{
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_13
,
GUI_BLENDMODE_SRC_OVER
);
/*请更换*/
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_douhao
,
534u
,
281u
,
GUI_BLENDMODE_SRC_OVER
);
/*逗号*/
if
(
User_FLAG
==
1u
)
GUI_General_Digit_Display
(
MENU_Sprite
,
User_Value
,
Nb_15_0
,
6u
,
5u
,
GUI_REP1_X
,
277u
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
((
Sig_Engine_oil
==
2u
)
&&
(
Sig_Starter
==
2u
))
/*本报警*/
{
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_douhao
,
534u
,
281u
,
GUI_BLENDMODE_SRC_OVER
);
/*逗号*/
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*请更换*/
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_fuhao
,
506u
,
279u
,
GUI_BLENDMODE_SRC_OVER
);
/*负号*/
GUI_Translate_Display
(
MENU_Sprite
,
Nb_15_douhao
,
534u
,
281u
,
GUI_BLENDMODE_SRC_OVER
);
/*逗号*/
GUI_General_Digit_Display
(
MENU_Sprite
,
1000u
,
Nb_15_0
,
4u
,
3u
,
GUI_REP
_X
,
277u
,
GUI_BLENDMODE_SRC_OVER
);
GUI_General_Digit_Display
(
MENU_Sprite
,
1000u
,
Nb_15_0
,
6u
,
5u
,
GUI_REP1
_X
,
277u
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
User_FLAG
==
3u
)
else
if
(
(
Sig_Engine_oil
==
3u
)
&&
(
Sig_Starter
==
3u
))
/*空白*/
{
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*请更换*/
GUI_General_Display
(
MENU_Sprite
,
SpriteSize
,
GUI_BLENDMODE_SRC_OVER
);
}
else
{
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_01_12
,
GUI_BLENDMODE_SRC_OVER
);
/*请更换*/
GUI_General_Display
(
MENU_Sprite
,
SpriteSize
,
GUI_BLENDMODE_SRC_OVER
);
}
}
// User_Value = User_App.User_FDJYLQQ; /*显示数据*/
// User_FLAG = State_Flag.User_FDJYLQQ_FLAG; /*显示状态*/
//
// if (User_Value > 0u)
// {
// if (User_Value > 999u)
// {
// GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_12, GUI_BLENDMODE_SRC_OVER); /*距离更换*/
//
// //if (User_Value > 1000)
// //{
// // GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_12, GUI_BLENDMODE_SRC_OVER); /*距离更换*/
// //}
// //else
// //{
// // GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_14, GUI_BLENDMODE_SRC_OVER); /*即将更换*/
// //}
//
// GUI_Translate_Display(MENU_Sprite, Nb_15_douhao, 534u, 281u, GUI_BLENDMODE_SRC_OVER); /*逗号*/
// }
// else
// {
// GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_12, GUI_BLENDMODE_SRC_OVER); /*请更换*/
// GUI_General_Display(MENU_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
// }
//
// GUI_General_Digit_Display(MENU_Sprite, User_Value, Nb_15_0, 6u, 5u, GUI_REP1_X, 277u, GUI_BLENDMODE_SRC_OVER);
// }
// else
// {
// GUI_General_Display(MENU_Sprite, CN_User_Menu3_01_13, GUI_BLENDMODE_SRC_OVER); /*请更换*/
//
// if (User_FLAG == 1u)
// {
// GUI_Translate_Display(MENU_Sprite, Nb_15_douhao, 534u, 281u, GUI_BLENDMODE_SRC_OVER); /*逗号*/
// GUI_Translate_Display(MENU_Sprite, Nb_15_fuhao, 506u, 279u, GUI_BLENDMODE_SRC_OVER); /*负号*/
//
// GUI_General_Digit_Display(MENU_Sprite, 1000u, Nb_15_0, 4u, 3u, GUI_REP_X, 277u, GUI_BLENDMODE_SRC_OVER);
// }
// else if (User_FLAG == 3u)
// {
// GUI_General_Display(MENU_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
// }
// }
}
else
{
...
...
@@ -6235,30 +6297,33 @@ void GUI_BG_Enter_Return_Display(uint8_t Mode)
void
Common_EOL_User_Server
(
void
)
{
/*发动机油*/
if
(
State_Flag
.
User_FDJYLQQ_FLAG
!=
3u
)
{
if
(
User_App
.
User_FDJYLQQ
>
0
)
{
if
(
User_App
.
User_FDJYLQQ
>=
(
Data_Read_Trip
(
EM_TRIP_JY
)
/
10u
))
{
User_App
.
User_FDJYLQQ
=
((
uint32_t
)
K_Line_Set
.
K_Line_LID4F
*
1000u
)
-
Data_Read_Trip
(
EM_TRIP_JY
)
/
10u
;
}
else
{
User_App
.
User_FDJYLQQ
=
0u
;
}
if
(
User_App
.
User_FDJYLQQ
<=
1000
)
{
State_Flag
.
User_FDJYLQQ_FLAG
=
2u
;
}
}
else
{
State_Flag
.
User_FDJYLQQ_FLAG
=
1
;
}
}
uint8_t
Sig_Engine_oil
=
0u
;
uint8_t
Sig_Starter
=
0u
;
uint8_t
CanStatus
=
0u
;
/*发动机油&滤清器*/
// if (State_Flag.User_FDJYLQQ_FLAG != 3u)
// {
// if (User_App.User_FDJYLQQ > 0 )
// {
// if (User_App.User_FDJYLQQ >= (Data_Read_Trip(EM_TRIP_JY) / 10u))
// {
// User_App.User_FDJYLQQ = ((uint32_t)K_Line_Set.K_Line_LID4F * 1000u) - Data_Read_Trip(EM_TRIP_JY) / 10u;
// }
// else
// {
// User_App.User_FDJYLQQ = 0u;
// }
//
// if (User_App.User_FDJYLQQ <= 1000)
// {
// State_Flag.User_FDJYLQQ_FLAG = 2u;
// }
// }
// else
// {
// State_Flag.User_FDJYLQQ_FLAG = 1;
// }
// }
/*燃油滤清器*/
if
(
State_Flag
.
User_RYLQQ_FLAG
!=
3u
)
...
...
source/Application/Graphic/Menu/Menu_user.c
View file @
bdf23998
...
...
@@ -945,18 +945,18 @@ void Level2_6Menu_2Exit(void)
{}
/*----三级菜单----保养通知----系列子菜单*/
/*发动机机油滤清器*/
/*发动机机油滤清器
特殊处理
*/
void
Level3_2Menu_1Enter
(
void
)
{
if
(
MenuFlag
.
Menu_Return
)
{
User_App
.
User_FDJYLQQ
=
(
uint32_t
)
K_Line_Set
.
K_Line_LID4F
*
1000
;
State_Flag
.
User_FDJYLQQ_FLAG
=
0
;
MenuFlag
.
Menu_Return
=
0
;
Data_Clear_Trip
(
EM_TRIP_JY
);
}
//
if (MenuFlag.Menu_Return)
//
{
//
User_App.User_FDJYLQQ = (uint32_t)K_Line_Set.K_Line_LID4F * 1000;
//
//
State_Flag.User_FDJYLQQ_FLAG = 0;
//
MenuFlag.Menu_Return = 0;
//
//
Data_Clear_Trip(EM_TRIP_JY);
//
}
}
void
Level3_2Menu_1Do
(
void
)
{
...
...
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