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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#include "GUI_Display\GUI_Display.h"
#include "SEG_DISPLAY\SEG_DISPLAY.h"
#include "Application.h"
void Gauge_VSpeed_Display(void)
{
uint16_t VSpeedDisplayValue = 0;
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
if ( Get_VechileSpeedValid( ) == 1u )
{
VSpeedDisplayValue = Get_DispVechileSpeed( ) / 10u;
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue);
}
else
{
VSpeedDisplayValue = 0u;
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue);
}
}
else
{
VSpeedDisplayValue = 0u;
SEG_SET_VSpeed_NUM(0u, 0u);
}
}
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_06_Screen_Time, 100);
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_06_Screen_Time, 0);
}
}
void Gauge_Trip_Display(void)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
SEG_SET_TRIP_NUM(1u, Get_Trip_Value());
}
else
{
SEG_SET_TRIP_NUM(0u, 0u);
}
}
void Gauge_ODO_Display(void)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
SEG_SET_ODO_NUM(1u, Get_ODO_Value() / 10u);
}
else
{
SEG_SET_ODO_NUM(0u, 0u);
}
}
void Gauge_FuelDial_Display(void)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
SEG_SET_FuelDial(1, Get_CurFuelSetp());
}
else
{
SEG_SET_FuelDial(0, 0);
}
}
void Gauge_EspeedDial_Display(void)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
SEG_SET_EspeedDial(1, Get_DispEngineSpeed()/1000, Get_DispEngineSpeed());
}
else
{
SEG_SET_EspeedDial(0, 0, 0);
}
}
void Gauge_Frame_Display(void)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
SEG_SET_Frame(1);
}
else
{
SEG_SET_Frame(0);
}
}
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;
Gauge_Frame_Display();
if (ClearODO_Flag == 1)
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
Check_SEG_Display();
}
else
{
Clear_Bu98();
//RTE_GPIO_Set_Level(VSPEED_TEN_OUT, 0);
//RTE_GPIO_Set_Level(VSPEED_HUNDREDS_OUT, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_Normal_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_03_High_Low_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_Fuel_W, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Fuel_Y, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 0);
}
}
else
{
if ( Common_Get_IG_Sts( ) == COMMON_POWER_ON )
{
if (Common_GetIgnOnTime() >= 3000)
{
if (VSpeed_Count < 3)
{
VSpeed_Count++;
}
else
{
VSpeed_Count = 0;
Gauge_VSpeed_Display();
}
Gauge_ODO_Display();
Gauge_Clock_Display();
Gauge_Trip_Display();
Gauge_FuelDial_Display();
Gauge_EspeedDial_Display();
}
else
{
Checkself_SEG_Display();
}
}
else
{
Clear_Bu98();
//RTE_GPIO_Set_Level(VSPEED_TEN_OUT, 0);
//RTE_GPIO_Set_Level(VSPEED_HUNDREDS_OUT, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_Normal_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_03_High_Low_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_Fuel_W, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Fuel_Y, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 0);
}
}
}