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
94732bc3
Commit
94732bc3
authored
Jan 13, 2023
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整断码刷新次数,增加TFT颜色自检,falash校验
parent
ddf667ca
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
190 additions
and
7 deletions
+190
-7
Application.gpj
ghs/group/Application.gpj
+2
-0
Key.c
source/Application/APP/Key/Key.c
+1
-1
SEG_DISPLAY.c
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
+3
-3
FlashCheckSum.c
source/Application/Graphic/GUI/FlashCheckSum.c
+81
-0
FlashCheckSum.h
source/Application/Graphic/GUI/FlashCheckSum.h
+12
-0
GUI.c
source/Application/Graphic/GUI/GUI.c
+82
-1
GUI.h
source/Application/Graphic/GUI/GUI.h
+2
-0
DisplaySch_user.c
source/Application/Graphic/UE/DisplaySch_user.c
+7
-2
No files found.
ghs/group/Application.gpj
View file @
94732bc3
...
...
@@ -11,6 +11,8 @@
.\Graphic\GUI\GUI.h
.\Graphic\GUI\GUI_Interface.c
.\Graphic\GUI\GUI_Interface.h
.\Graphic\GUI\FlashCheckSum.c
.\Graphic\GUI\FlashCheckSum.h
.\Alarm\AlarmGeneralFilie.c
.\Alarm\AlarmGeneralFilie.h
.\Alarm\Door.c
...
...
source/Application/APP/Key/Key.c
View file @
94732bc3
...
...
@@ -310,7 +310,7 @@ void Key_Init(void)
stKeyParameter
.
u16KeyLoosenTime
=
100U
;
stKeyParameter
.
u16KeyShortPressTime
=
80U
;
stKeyParameter
.
u16KeyLongPressTime
=
1000U
;
stKeyParameter
.
u16KeySuperLongPressTime
=
5
000U
;
stKeyParameter
.
u16KeySuperLongPressTime
=
3
000U
;
stKeyParameter
.
u16KeyValidOFFTime
=
200U
;
/*按键动作时间*/
stKeyParameter
.
u16KeyValidONTime
=
1000U
;
}
...
...
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
View file @
94732bc3
...
...
@@ -1054,7 +1054,7 @@ void Seg_Display_Service(void)
Seg_Digit_2_Disp
(
12
);
Seg_Digit_3_Disp
(
12
);
GaugesTimer
=
5
u
;
GaugesTimer
=
4
u
;
}
else
{
...
...
@@ -1082,11 +1082,11 @@ void Seg_Display_Service(void)
Seg_Digit_3_Disp
(
12
);
}
GaugesTimer
=
5
u
;
GaugesTimer
=
4
u
;
}
else
if
(
GaugesTimer
==
0u
)
{
GaugesTimer
=
5
u
;
GaugesTimer
=
4
u
;
if
(
Common_Get_Air1_Valid
())
{
...
...
source/Application/Graphic/GUI/FlashCheckSum.c
0 → 100644
View file @
94732bc3
#include "FlashCheckSum.h"
#include "dr7f701441.dvf.h"
#include "Watchdog.h"
static
unsigned
int
SwapData_32
(
unsigned
int
Data
)
{
unsigned
int
RetVal
=
Data
;
RetVal
=
((
RetVal
>>
1
)
&
0x55555555
)
|
((
RetVal
<<
1
)
&
0xaaaaaaaa
);
RetVal
=
((
RetVal
>>
2
)
&
0x33333333
)
|
((
RetVal
<<
2
)
&
0xcccccccc
);
RetVal
=
((
RetVal
>>
4
)
&
0x0f0f0f0f
)
|
((
RetVal
<<
4
)
&
0xf0f0f0f0
);
RetVal
=
((
RetVal
>>
8
)
&
0x00ff00ff
)
|
((
RetVal
<<
8
)
&
0xff00ff00
);
RetVal
=
((
RetVal
>>
16
)
&
0x0000ffff
)
|
((
RetVal
<<
16
)
&
0xffff0000
);
return
RetVal
;
}
unsigned
int
CRC32_VAL
;
static
void
CheckCrc32
(
unsigned
char
*
buf
,
int
len
)
{
int
i
;
int
n
=
0
;
unsigned
char
tmp
=
0
;
unsigned
int
crc
=
CRC32_VAL
;
// Initial value
for
(
n
=
0
;
n
<
len
;
n
++
)
{
tmp
=
buf
[
n
];
tmp
=
(
tmp
>>
4
)
|
(
tmp
<<
4
);
tmp
=
(((
tmp
&
0xcc
)
>>
2
)
|
((
tmp
&
0x33
)
<<
2
));
tmp
=
(((
tmp
&
0xaa
)
>>
1
)
|
((
tmp
&
0x55
)
<<
1
));
crc
^=
(
unsigned
int
)(
tmp
)
<<
24
;
for
(
i
=
0
;
i
<
8
;
++
i
)
{
if
(
crc
&
0x80000000L
)
{
crc
=
(
crc
<<
1
)
^
0x04C11DB7
;
}
else
{
crc
<<=
1
;
}
}
}
CRC32_VAL
=
crc
;
return
;
}
unsigned
char
CheckSpiFlashCRC
(
void
)
{
unsigned
char
TmpRet
=
0
;
unsigned
int
BinCrc
=
REAL_FLASHCHECKSUM
;
//*((unsigned int *)(SPI_START_ADDR + 0x8u));
unsigned
int
BinCrcLen
=
SPI_ADDR_RANGE
;
//*((unsigned int *)(SPI_START_ADDR));
unsigned
int
CheckCrcAddr
=
SPI_START_ADDR
;
//SPI_START_ADDR + 0x20u;
unsigned
int
tmp
;
unsigned
int
CheckCrc
=
0
;
unsigned
int
i
;
unsigned
int
EndData
=
0
;
DCRA0ISZ
=
0
;
DCRA0POL
=
0
;
DCRA0COUT
=
0xffffffff
;
if
(
/*(BinCrcLen > 0x00000020) && */
(
BinCrcLen
<
0x08000000
))
{
for
(
i
=
0
;
i
<
(
BinCrcLen
/
4
);
i
++
)
{
WDT_Clear
();
tmp
=
*
((
unsigned
int
*
)(
CheckCrcAddr
+
(
i
*
4
)));
DCRA0CIN
=
tmp
;
CheckCrc
=
DCRA0COUT
;
}
tmp
=
*
((
unsigned
int
*
)(
CheckCrcAddr
+
(
i
*
4
)));
if
(
BinCrcLen
%
4
!=
0u
)
{
CheckCrc
=
CheckCrc
^
0xffffffff
;
CheckCrc
=
SwapData_32
(
CheckCrc
);
CRC32_VAL
=
CheckCrc
;
CheckCrc32
(
&
tmp
,
BinCrcLen
%
4
);
CheckCrc
=
SwapData_32
(
CRC32_VAL
);
CheckCrc
=
CheckCrc
^
0xffffffff
;
}
if
(
CheckCrc
==
BinCrc
)
{
TmpRet
=
1
;
}
}
return
TmpRet
;
}
\ No newline at end of file
source/Application/Graphic/GUI/FlashCheckSum.h
0 → 100644
View file @
94732bc3
#ifndef __FLASHCHECKSUM_H_
#define __FLASHCHECKSUM_H_
#define REAL_FLASHCHECKSUM 0xBF69240C
#define SPI_START_ADDR 0x10000000u
#define SPI_ADDR_RANGE 0x04222DA0
unsigned
char
CheckSpiFlashCRC
(
void
);
#endif
\ No newline at end of file
source/Application/Graphic/GUI/GUI.c
View file @
94732bc3
...
...
@@ -35,6 +35,7 @@
#include "GPIO.h"
#include "DisplaySch_user.h"
#include "DispSch.h"
#include "FlashCheckSum.h"
#pragma alignvar(8)
uint32_t
EolNUM
[
10u
][
8u
];
...
...
@@ -96,7 +97,6 @@ void GUI_Display_background(void)
void
GUI_Display_backgroundOFF
(
void
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_black
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
WET_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
AdBlue_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
TRIP_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
...
...
@@ -10322,4 +10322,85 @@ void Common_Set_DTCNumTime(uint32_t Vol)
{
DTCNumTime
=
Vol
;
DTCDispNum
=
Vol
;
}
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
;
static
uint16_t
Time
=
0
;
static
uint16_t
Flag
=
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 ))
{
if
(
CheckSpiFlashCRC
()
==
0
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_red
,
GUI_BLENDMODE_SRC_OVER
);
}
else
{
while
(
1
)
{
WDT_Clear
();
Time
++
;
if
(
Time
>
500
)
{
Time
=
0
;
if
(
Flag
<=
7
)
{
Flag
++
;
}
}
if
((
Flag
==
0
)
&&
(
Time
==
1
))
{
loc_Del_Sprite
(
WET_Sprite
,
Calendar_Sprite
);
loc_free_mem
(
WET_Sprite
,
Calendar_Sprite
);
}
else
if
(
Flag
==
1
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_white
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
2
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_blue
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
3
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_red
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
4
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_green
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
5
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_black
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
6
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_MSK
,
GUI_BLENDMODE_SRC_OVER
);
}
else
if
(
Flag
==
7
)
{
HMI_Clear_KEY_CONFIRM
();
GUI_General_Display
(
WET_Sprite
,
ditu_2
,
GUI_BLENDMODE_CUSTOM
);
loc_enable_mem
(
WET_Sprite
,
Calendar_Sprite
);
break
;
}
}
}
}
}
\ No newline at end of file
source/Application/Graphic/GUI/GUI.h
View file @
94732bc3
...
...
@@ -556,6 +556,8 @@ 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
);
void
GUI_General_Popup_Display
(
uint16_t
PopupMsg
);
...
...
source/Application/Graphic/UE/DisplaySch_user.c
View file @
94732bc3
...
...
@@ -25,6 +25,7 @@ uint8_t BG_display_flag;
uint16_t
HMI_StartAnimationFrameCnt
;
uint8_t
backgroundOFFFlag
;
uint32_t
BackOdoFlagSta
;
static
void
switch_branch
(
void
);
...
...
@@ -185,10 +186,13 @@ void DisplayServices(void)
/*确认超长 5 S*/
else
if
(
UE_CtrlInfo
.
HMI_KEYInfo
.
u8KEY_CONFIRM
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
HMI_Clear_KEY_CONFIRM
();
//HMI_Clear_KEY_CONFIRM();
/*TYW总计清零*/
TYW_Data_ODO_Clear
();
//if (Data_ODO_Read() != 0)
BackOdoFlagSta
++
;
//Gui_Display_Test();
}
/*返回短*/
else
if
(
UE_CtrlInfo
.
HMI_KEYInfo
.
u8KEY_CANCEL
==
KEY_EVENT_SHORT_PRESS
)
...
...
@@ -242,6 +246,7 @@ void Display_StartAnimationEnter(void)
HMI_StartAnimationFrameCnt
=
0u
;
backgroundOFFFlag
=
0
;
MenuFlag
.
Menu_Popup_Flag
=
0u
;
BackOdoFlagSta
=
0
;
/*硬清空所有缓存数据*/
loc_free_mem
(
MENU_Sprite
,
MENU_Sprite
);
...
...
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