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
3d26f834
Commit
3d26f834
authored
Jan 18, 2023
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加段码1-9显示
parent
1b397935
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
142 additions
and
189 deletions
+142
-189
Services_ODO_user.c
source/Application/APP/Data_ODO/Services_ODO_user.c
+1
-1
SEG_DISPLAY.c
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
+119
-84
SEG_DISPLAY.h
source/Application/APP/SEG_LCD/SEG_DISPLAY.h
+5
-1
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+6
-5
GUI.c
source/Application/Graphic/GUI/GUI.c
+0
-94
GUI.h
source/Application/Graphic/GUI/GUI.h
+0
-1
DisplaySch_user.c
source/Application/Graphic/UE/DisplaySch_user.c
+1
-0
tasks.c
source/System/tasks.c
+10
-3
No files found.
source/Application/APP/Data_ODO/Services_ODO_user.c
View file @
3d26f834
...
...
@@ -153,7 +153,7 @@ void TYW_Data_ODO_Clear(void)
Get_Data_Rev_value
=
GetGaugesCurrentPos
(
RevGauges
)
;
Get_Data_Rev_valueMax
=
GetGaugesMaxOutVal
(
RevGauges
)
;
if
((
Get_Data_Veh_value
>=
Get_Data_Veh_valueMax
)
&&
(
Get_Data_Rev_value
>=
Get_Data_Rev_valueMax
))
//
if (( Get_Data_Veh_value >= Get_Data_Veh_valueMax ) && ( Get_Data_Rev_value >= Get_Data_Rev_valueMax ))
{
Data_Mileage_Clear
();
}
...
...
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
View file @
3d26f834
...
...
@@ -11,12 +11,22 @@
#include "DisplaySch_user.h"
#include "TYW_stdint.h"
#include "FlashCheckSum.h"
#include "Watchdog.h"
#include "jcua.h"
#include "r_wm_api.h"
#include "Graphic.h"
#include "BU98R10.h"
#include "Telltales.h"
#include "Telltales_user.h"
#define PRI_SEG_NUM_MAX 17U
#define SEC_SEG_NUM_MAX 17U
#define COOLANT_SEG_NUM_MAX 12U
#define FUEL_SEG_NUM_MAX 12U
#define TACHO_SEG_NUM_MAX 27U
#define VEH_SEG_NUM_MAX 30U
extern
uint32_t
SelfdiagnosisTime
;
static
void
Seg_General_Digit_Display
(
uint32_t
Digit
,
uint8_t
Len
,
uint8_t
Blank
,
uint8_t
*
DigitBuf
,
uint8_t
*
Reg
);
static
void
Seg_Digit_1_Disp
(
uint8_t
Digit
);
...
...
@@ -1194,114 +1204,139 @@ void Seg_Display_OFF(void)
}
}
/*
static void BU98R10_All_ReadRam(uint8_t addr, uint8_t *data0, uint8_t *data1)
{
uint8_t i;
uint8_t Cmd = 0x09;
uint8_t wdata0 = 0;
uint8_t wdata1 = 0;
SegLCD_AllChip_Write(BU98R10_CMD, BU98R10_CMD_ADSET, BU98R10_CMD_ADSET, BU98R10_CMD_ADSET)
;
SegLCD_AllChip_Write(BU98R10_DATA, addr, addr, addr);
uint8_t
Flash_time
=
0
;
uint16_t
Color_Time
=
0
;
// 20 更换一次颜色
Cmd = 0x09;
// D/C = 0,表示发送命令
SegLCD_Set_SD(0);
SegLCD_Set_SCL(0);
SegLCD_Set_CSB(0);
void
Gui_Display_Test
(
void
)
{
uint16_t
Get_Data_Veh_value
=
0u
;
uint16_t
Get_Data_Rev_value
=
0u
;
uint16_t
Get_Data_Veh_valueMax
=
0u
;
uint16_t
Get_Data_Rev_valueMax
=
0u
;
uint32_t
TmpRet
=
0
;
Bu98R10_Delay(Bu98R10_Delay_TIME);
SegLCD_Set_SCL(1);
/*获取的是步数,与当前步数*/
Get_Data_Veh_value
=
GetGaugesCurrentPos
(
VehGauges
)
;
Get_Data_Veh_valueMax
=
GetGaugesMaxOutVal
(
VehGauges
)
;
for (i = 0; i < 8; i++)
{
SegLCD_Set_SCL(0);
Get_Data_Rev_value
=
GetGaugesCurrentPos
(
RevGauges
)
;
Get_Data_Rev_valueMax
=
GetGaugesMaxOutVal
(
RevGauges
)
;
if (Cmd & 0x80)
{
SegLCD_Set_SD(1);
}
else
//if (( Get_Data_Veh_value >= Get_Data_Veh_valueMax ) && ( Get_Data_Rev_value >= Get_Data_Rev_valueMax ))
{
while
(
1
)
{
SegLCD_Set_SD(0);
}
Bu98R10_Delay(Bu98R10_Delay_TIME);
SegLCD_Set_SCL(1);
Cmd <<= 1;
}
SegLCD_Set_SD_Dir(0);
WDT_Clear
();
SegLCD_Set_SCL(0);
Bu98R10_Delay(Bu98R10_Delay_TIME);
if
(
Flash_time
<
30
)
{
Flash_time
++
;
}
else
{
if
(
Color_Time
>=
0
&&
Color_Time
<
20
)
{
//蓝色
Loc_Display_Red
(
0
,
0
,
0XFF
);
}
else
if
(
Color_Time
>=
20
&&
Color_Time
<
40
)
{
//绿色
Loc_Display_Red
(
0
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
40
&&
Color_Time
<
60
)
{
//黄色
Loc_Display_Red
(
0xFF
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
60
&&
Color_Time
<
80
)
{
//红色
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
if
(
Color_Time
>=
80
&&
Color_Time
<
100
)
{
//黑色
Loc_Display_Red
(
0
,
0
,
0
);
}
else
if
(
Color_Time
>=
100
&&
Color_Time
<
120
)
{
//白色
Loc_Display_Red
(
0xFF
,
0xFF
,
0XFF
);
}
else
if
(
Flash_time
==
30
)
{
Flash_time
=
250
;
SegLCD_Set_SCL(1);
Bu98R10_Delay(Bu98R10_Delay_TIME);
TmpRet
=
CheckSpiFlashCRC
();
for (i = 0; i < 8; i++)
{
SegLCD_Set_SCL(0);
wdata0 <<= 1;
wdata1 <<= 1;
SegLCD_Set_SCL(1);
if
(
TmpRet
==
0
)
{
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
{
//检验正常。恢复显示正常界面
if
(
Color_Time
==
120
)
{
Loc_Display_Red
(
1
,
1
,
1
);
Flash_time
=
0
;
Color_Time
=
0
;
break
;
}
}
}
if (SegLCD_Get_SD0_Data)
{
wdata0 |= SegLCD_Get_SD0_Data;
}
if (SegLCD_Get_SD1_Data)
{
wdata1 |= SegLCD_Get_SD1_Data;
if
(
Color_Time
<
120
)
{
Color_Time
++
;
}
}
}
}
*data0 = wdata0;
*data1 = wdata1;
SegLCD_Set_SD_Dir(1);
SegLCD_Set_CSB(1);
}
uint8_t checkInterval = 0;
uint8_t checkCount = 0;
uint8_t checkData[2];
void checkSegTftState(void)
uint8_t
aaa
=
0
;
extern
uint8_t
BackOdoFlagSta
;
void
Gui_9810_Test
(
void
)
{
uint32_t PowerStatus = 0u;
PowerStatus = Common_Get_IG_Sts();
static
uint8_t
Time
=
0
;
if (
PowerStatus == COMMON_POWER_ON
)
if
(
Time
==
0
)
{
checkInterval++;
if (checkInterval >= 5)
{
BU98R10_All_ReadRam(30, &checkData[0], &checkData[1]);
checkInterval = 0;
Time
=
100
;
if ((checkData[1] & 0x0f) != 0x07)
{
checkCount = 50;
}
}
if (checkCount)
SEG_A25_Disp
(
7u
);
/*左侧弧线*/
SEG_C25_Disp
(
7u
);
/*右侧弧线*/
SEG_PRI_Display
(
20
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*PRI气压格*/
SEG_SEC_Display
(
20
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*SEC气压格*/
SEG_Coolant_Display
(
12
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*水温格*/
SEG_Fuel_Display
(
12
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*燃油格*/
SEG_Tacho_Display
(
27
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*转速格*/
SEG_VehicleSpeed_Display
(
30
,
GUI_DISP_MODE_NORMAL
,
7u
);
/*车速格*/
if
(
aaa
==
10
)
{
checkCount--
;
aaa
=
11
;
}
if (checkCount == 30)
Seg_Digit_1_Disp
(
aaa
);
Seg_Digit_2_Disp
(
aaa
);
Seg_Digit_3_Disp
(
aaa
);
if
(
aaa
>=
12
)
{
BU98R10_Init();
BackOdoFlagSta
=
0
;
aaa
=
0
;
Time
=
0
;
}
aaa
++
;
}
else
{
checkInterval = 0;
checkCount = 0;
Time
--
;
}
}
*/
\ No newline at end of file
}
\ No newline at end of file
source/Application/APP/SEG_LCD/SEG_DISPLAY.h
View file @
3d26f834
...
...
@@ -2,7 +2,8 @@
#define _SEG_DISPLAY_H_
#include "Seg_Ref.h"
void
SEG_A25_Disp
(
uint8_t
seg_status
);
void
SEG_C25_Disp
(
uint8_t
seg_status
);
void
SEG_LED_INTER_DIFF_LOCK_T
(
uint8_t
seg_status
);
void
SEG_LED_FOUR_MUL_FOUR_T
(
uint8_t
seg_status
);
void
SEG_LED_EXH_BRAKE_T
(
uint8_t
seg_status
);
...
...
@@ -48,5 +49,8 @@ extern void Seg_Display_Service(void);
extern
void
Seg_Display_ON
(
void
);
extern
void
Seg_Display_OFF
(
void
);
void
Gui_Display_Test
(
void
);
void
Gui_9810_Test
(
void
);
#endif
source/Application/APP/Telltales/Telltales_user.c
View file @
3d26f834
...
...
@@ -20,6 +20,7 @@
#include "Common_Interface.h"
static
uint8_t
L12_Air_Sta
;
extern
uint8_t
BackOdoFlagSta
;
TelltaleLRCtrlStruct
TelltaleLRCtrl
;
...
...
@@ -928,7 +929,7 @@ uint8_t LED_AEBS_OFF_L_Judgement(void)
}
void
LED_AEBS_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
K_Line_Set
.
K_Line_LID28
==
0x01u
)
if
(
(
K_Line_Set
.
K_Line_LID28
==
0x01u
)
||
(
BackOdoFlagSta
==
1
)
)
{
if
(
led_status
==
1
)
{
...
...
@@ -992,7 +993,7 @@ uint8_t LED_LDWS_L_Judgement(void)
}
void
LED_LDWS_L_Execution
(
uint8_t
led_status
)
{
if
(
K_Line_Set
.
K_Line_LID27
==
0x01u
)
if
(
(
K_Line_Set
.
K_Line_LID27
==
0x01u
)
||
(
BackOdoFlagSta
==
1
)
)
{
if
(
led_status
==
1
)
{
...
...
@@ -1248,7 +1249,7 @@ uint8_t LED_TPMS_L_Judgement(void)
}
void
LED_TPMS_L_Execution
(
uint8_t
led_status
)
{
if
(
K_Line_Set
.
K_Line_LID3E
==
0x01u
)
if
(
(
K_Line_Set
.
K_Line_LID3E
==
0x01u
)
||
(
BackOdoFlagSta
==
1
)
)
{
if
(
led_status
==
1
)
{
...
...
@@ -1301,7 +1302,7 @@ uint8_t LED_ASR_or_EVSC_OFF_L_Judgement(void)
}
void
LED_ASR_or_EVSC_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
K_Line_Set
.
K_Line_LID22
==
0x01u
)
if
(
(
K_Line_Set
.
K_Line_LID22
==
0x01u
)
||
(
BackOdoFlagSta
==
1
)
)
{
if
(
led_status
==
1
)
{
...
...
@@ -1504,7 +1505,7 @@ uint8_t LED_AMT_L_Judgement(void)
}
void
LED_AMT_L_Execution
(
uint8_t
led_status
)
{
if
(
K_Line_Set
.
K_Line_LID41
==
0x13u
)
if
(
(
K_Line_Set
.
K_Line_LID41
==
0x13u
)
||
(
BackOdoFlagSta
==
1
)
)
{
if
(
led_status
==
1
)
{
...
...
source/Application/Graphic/GUI/GUI.c
View file @
3d26f834
...
...
@@ -35,8 +35,6 @@
#include "GPIO.h"
#include "DisplaySch_user.h"
#include "DispSch.h"
#include "FlashCheckSum.h"
#include "Graphic.h"
#pragma alignvar(8)
uint32_t
EolNUM
[
10u
][
8u
];
...
...
@@ -10324,95 +10322,3 @@ void Common_Set_DTCNumTime(uint32_t Vol)
DTCNumTime
=
Vol
;
DTCDispNum
=
Vol
;
}
uint8_t
Flash_time
=
0
;
uint16_t
Color_Time
=
0
;
// 20 更换一次颜色
void
Gui_Display_Test
(
void
)
{
uint16_t
Get_Data_Veh_value
=
0u
;
uint16_t
Get_Data_Rev_value
=
0u
;
uint16_t
Get_Data_Veh_valueMax
=
0u
;
uint16_t
Get_Data_Rev_valueMax
=
0u
;
uint32_t
TmpRet
=
0
;
/*获取的是步数,与当前步数*/
Get_Data_Veh_value
=
GetGaugesCurrentPos
(
VehGauges
)
;
Get_Data_Veh_valueMax
=
GetGaugesMaxOutVal
(
VehGauges
)
;
Get_Data_Rev_value
=
GetGaugesCurrentPos
(
RevGauges
)
;
Get_Data_Rev_valueMax
=
GetGaugesMaxOutVal
(
RevGauges
)
;
if
((
Get_Data_Veh_value
>=
Get_Data_Veh_valueMax
)
&&
(
Get_Data_Rev_value
>=
Get_Data_Rev_valueMax
))
{
while
(
1
)
{
WDT_Clear
();
if
(
Flash_time
<
30
)
{
Flash_time
++
;
}
else
{
if
(
Color_Time
>=
0
&&
Color_Time
<
20
)
{
//蓝色
Loc_Display_Red
(
0
,
0
,
0XFF
);
}
else
if
(
Color_Time
>=
20
&&
Color_Time
<
40
)
{
//绿色
Loc_Display_Red
(
0
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
40
&&
Color_Time
<
60
)
{
//黄色
Loc_Display_Red
(
0xFF
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
60
&&
Color_Time
<
80
)
{
//红色
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
if
(
Color_Time
>=
80
&&
Color_Time
<
100
)
{
//黑色
Loc_Display_Red
(
0
,
0
,
0
);
}
else
if
(
Color_Time
>=
100
&&
Color_Time
<
120
)
{
//白色
Loc_Display_Red
(
0xFF
,
0xFF
,
0XFF
);
}
else
if
(
Flash_time
==
30
)
{
Flash_time
=
250
;
TmpRet
=
CheckSpiFlashCRC
();
if
(
TmpRet
==
0
)
{
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
{
//检验正常。恢复显示正常界面
if
(
Color_Time
==
120
)
{
Loc_Display_Red
(
1
,
1
,
1
);
Flash_time
=
0
;
Color_Time
=
0
;
break
;
}
}
}
if
(
Color_Time
<
120
)
{
Color_Time
++
;
}
}
}
}
}
\ No newline at end of file
source/Application/Graphic/GUI/GUI.h
View file @
3d26f834
...
...
@@ -556,7 +556,6 @@ void K_LINE_EOL_Val_Server(void); /**/
void
Common_Set_MenuDTCNumTime
(
uint32_t
Vol
);
void
Common_Set_DTCNumTime
(
uint32_t
Vol
);
void
Gui_Display_Test
(
void
);
/*-----报警--------------------------------------------------------*/
void
GUI_General_Popup
(
void
);
...
...
source/Application/Graphic/UE/DisplaySch_user.c
View file @
3d26f834
...
...
@@ -10,6 +10,7 @@
#include "Menu.h"
#include "jcua.h"
#include "kwp2000_service.h"
#include "SEG_DISPLAY.h"
uint32_t
EnterTimer
[
10
];
uint8_t
UE_EN
[
Display_MAX
];
...
...
source/System/tasks.c
View file @
3d26f834
...
...
@@ -95,7 +95,7 @@
#include "GenDelay.h"
static
uint32_t
K_Line1ms_count
;
extern
uint8_t
BackOdoFlagSta
;
/*******************************************************************************
* *
* 系统常规运行模式(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )任务列表 *
...
...
@@ -174,7 +174,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
Line_In_Debounce_Service
();
Telltales_Left_Right_Management_Service
();
if
(
MenuFlag
.
Menu_Popup_Flag
==
4u
)
if
(
(
MenuFlag
.
Menu_Popup_Flag
==
4u
)
||
(
BackOdoFlagSta
==
1
)
)
{
Test_LED_AllLight
();
}
...
...
@@ -210,7 +210,14 @@ void Sys_Run_Mode_20ms_Tasks(void)
Voltmeter_Processing_Service
();
Sound_Management_Service
();
CD4051B_Debounce_Service
();
Seg_Display_Service
();
/*段码显示逻辑*/
if
(
BackOdoFlagSta
==
0
)
{
Seg_Display_Service
();
/*段码显示逻辑*/
}
else
{
Gui_9810_Test
();
}
Seg_Buffer_Commit
();
BU98R10_Update_Request
();
}
...
...
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