1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#include "GUI_Display\GUI_Display.h"
#include "SEG_DISPLAY\SEG_DISPLAY.h"
#include "Application.h"
void Gauge_Clock_Display(void)
{
uint8_t PageType_DIS = 0;
if (Common_Get_IG_Sts( ) == COMMON_POWER_ON)
{
PageType_DIS = Get_Current_PageType();
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_ON);
if ( PageType_DIS == 1 )
{
if(FLASH_SYNC_1Hz)
{
SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 1);
}
else
{
SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 0, 1);
}
}
else if ( PageType_DIS == 2 )
{
if(FLASH_SYNC_1Hz)
{
SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 1);
}
else
{
SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 0);
}
}
else
{
SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), FLASH_SYNC_1Hz, 1, 1);
}
}
else
{
SEG_SET_Clock(0, 0, 0, 0, 0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_OFF);
}
}
void Clear_Bu98(void)
{
uint8_t i = 0;
for(i = 0; i < BU98R10_DDRAM_SIZE; i ++)
{
BU98R10Chip0DDRAM.Byte[i] = 0;
BU98R10Chip1DDRAM.Byte[i] = 0;
}
}
void Gauge_Service(void)
{
static uint16_t VSpeed_Count = 0u;
uint8_t k = 0;
if (ClearODO_Flag == 1)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
Check_SEG_Display();
for(k = 0; k < LampCh0_MAX; k ++)
{
if (k == 24 || k == 21 || k == 13 || k == 26)
{
//k ++;
}
else
{
LED_Driver_Channel_Set(LampChannel_0, k, LED_ON);
}
}
}
else
{
Clear_Bu98();
for(k = 0; k < LampCh0_MAX; k ++)
{
LED_Driver_Channel_Set(LampChannel_0, k, LED_OFF);
}
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_35_ODO, LED_OFF);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_34_TRIP, LED_OFF);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_OFF);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
}
}
else
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
if (Common_GetIgnOnTime() >= 3030)
{
//for(i = 0; i < BU98R10_DDRAM_SIZE; i ++)
//{
// BU98R10Chip0DDRAM.Byte[i] = 0x77;
// BU98R10Chip1DDRAM.Byte[i] = 0x77;
//}
SEG_SET_VSpeed_NUM(1u, Get_DispVechileSpeed( ) / 10u,Get_Dis_KM_Unit());
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(Get_Dis_KM_Unit(), Get_ODO_Value() / 10u, Get_Trip_Value());
Gauge_Clock_Display();
SEG_SET_FuelDial(1, Get_CurFuelSetp());
SEG_SET_EspeedDial(1, Get_DispEngineSpeed()/500);
SEG_SET_CoolantDial(1, GET_DataCoolantTempSegDisp(), GET_DataCoolantSegValue(), GET_DataCollantTempSegValid());
SEG_SET_Voltage_NUM(1, Get_Battery_Voltage());
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY(1, Get_Front_TPMS_Sig_Value(), Get_Rear_TPMS_Sig_Value(), 0 ,Get_Front_TPMS_Sig_Vaild(), Get_Rear_TPMS_Sig_Vaild());
LED_Driver_Channel_Set(LampChannel_0, LampCh0_03, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04, LED_ON);
#endif
SEG_SET_Navigation_STS(Get_Navigation_St_Dis(),Get_Navigation_Code_Dis(),Get_Navigation_Mileage_Dis());
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_03, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04, LED_ON);
Checkself_SEG_Display();
}
}
else
{
Clear_Bu98();
LED_Driver_Channel_Set(LampChannel_0, LampCh0_03, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_35_ODO, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_34_TRIP, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_Navigator1, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_19_Navigator2, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_Length2, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_18_Length1, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_ARRIVED_SERVICE_AREA, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_ARRIVED_TOLLGATE, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_16_ARRIVED_TUNNEL, LED_OFF);
}
}
}