Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
8dec7321
Commit
8dec7321
authored
Aug 13, 2024
by
王佳伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into wjw_dev
parents
c384bd32
a6b11402
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
129 additions
and
74 deletions
+129
-74
BackLight.c
Firmware/Source/Application/BackLight.c
+35
-1
BackLight.h
Firmware/Source/Application/BackLight.h
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+8
-8
Menu_Interface.c
Firmware/Source/Component/Menu/Menu_Interface.c
+18
-11
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+5
-17
TrmerM.c
...are/Source/Device/Cmsemicon/BAT32A279/RTE/TrmerM/TrmerM.c
+49
-26
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+13
-10
No files found.
Firmware/Source/Application/BackLight.c
View file @
8dec7321
#include "Backlight.h"
#include "Components.h"
#define BACK_LIGHT_Val_1 100
#define BACK_LIGHT_Val_2 300
#define BACK_LIGHT_Val_3 500
#define BACK_LIGHT_Val_4 700
#define BACK_LIGHT_Val_5 900
#define LIGHT_DATA_TIME 10u
/*这里填写多长时间采集一个数据,单位ms*/
#define LIGHT_DATA_NUM 20u
/*燃油电阻采集数据总数 最大255*/
#define LIGHT_CAL_START 5u
/*数据排序后取中间部分计算平均:起始*/
...
...
@@ -478,3 +484,31 @@ void BackLight_Service(void)
Backlight_Operate
.
SetPwmCbk
(
0
);
}
}
void
BackLight_Process
(
void
)
{
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_5
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_5
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_4
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_4
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_3
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_3
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_2
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_2
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_1
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_1
);
}
else
{
;
}
}
Firmware/Source/Application/BackLight.h
View file @
8dec7321
...
...
@@ -22,7 +22,7 @@
#endif
/* NULL */
void
Backlight_KL30_Wakeup_Init
(
void
);
void
BackLight_Process
(
void
);
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
8dec7321
...
...
@@ -742,7 +742,7 @@ void AMT630H_GUI_Clock_Information(uint8_t Clock_Hour, uint8_t Clock_Min)
else
if
(
g_u8Language
==
EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0017_19_397
);
/*下方菜单*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0019_478_341
);
/*
返回
*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0019_478_341
);
/*
return
*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0021_510_222
);
/* : */
}
...
...
@@ -767,13 +767,13 @@ void AMT630H_GUI_Clock_Information(uint8_t Clock_Hour, uint8_t Clock_Min)
if
(
g_u8Language
==
CH
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0323_27_396
);
/*下方菜单*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
208_478_341
);
/*返回*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
324_489_338
);
/*返回*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0209_510_222
);
/* : */
}
else
if
(
g_u8Language
==
EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0206_19_397
);
/*下方菜单*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
324_489_338
);
/*返回
*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
208_478_341
);
/*return
*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0209_510_222
);
/* : */
}
...
...
@@ -1069,7 +1069,7 @@ static void AMT630H_GUI_Clock_Setting(uint8_t Clock_Hour, uint8_t Clock_Min, uin
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType
);
Menu_Logic_Operation_Clock_Hour_Tenb_Set
(
MENU_KEY_CONFIRM_SHORT
);
break
;
case
MENU_ITEM_CLOCK_HOUR_BIT_SET
:
/*Cursor blinking*/
...
...
@@ -1082,7 +1082,7 @@ static void AMT630H_GUI_Clock_Setting(uint8_t Clock_Hour, uint8_t Clock_Min, uin
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Hour_Bit_Set(Menu_Key_en_t enKeyType
);
Menu_Logic_Operation_Clock_Hour_Bit_Set
(
MENU_KEY_CONFIRM_SHORT
);
break
;
case
MENU_ITEM_CLOCK_MIN_TENB_SET
:
/*Cursor blinking*/
...
...
@@ -1095,7 +1095,7 @@ static void AMT630H_GUI_Clock_Setting(uint8_t Clock_Hour, uint8_t Clock_Min, uin
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Min_Tenb_Set(Menu_Key_en_t enKeyType
);
Menu_Logic_Operation_Clock_Min_Tenb_Set
(
MENU_KEY_CONFIRM_SHORT
);
break
;
case
MENU_ITEM_CLOCK_MIN_BIT_SET
:
/*Cursor blinking*/
...
...
@@ -1108,7 +1108,7 @@ static void AMT630H_GUI_Clock_Setting(uint8_t Clock_Hour, uint8_t Clock_Min, uin
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Min_Bit_Set(Menu_Key_en_t enKeyType
);
Menu_Logic_Operation_Clock_Min_Bit_Set
(
MENU_KEY_CONFIRM_SHORT
);
break
;
default:
break
;
...
...
@@ -3403,7 +3403,7 @@ static void AMT630H_GUI_Trip(uint32_t Trip, uint8_t Uint)
}
}
}
else
if
(
g_u8Display_Mode
==
Mode
DAY
)
else
if
(
g_u8Display_Mode
==
Mode
NIGHT
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0685_48_272
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0864_54_297
);
/*TRIP图标*/
...
...
Firmware/Source/Component/Menu/Menu_Interface.c
View file @
8dec7321
...
...
@@ -65,6 +65,10 @@ void Menu_User_Init(void)
Menu_Init_st
.
enMenuItemLen
=
MENU_ITEM_MAX
;
Menu_Init_st
.
uintMenuConfig
=
0x0001
;
Menu_Init_st
.
uintMenuCursorMemoryDepth
=
0
;
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_DAYTIME
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_BACKLIGHT_4
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_UNIT_KM
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_LANGUAGE_CHINESE
,
1
);
Menu_Init
((
uint8_t
*
)
u8MenuRamData
,
(
Menu_Item_Attribute_st_t
*
)
stMenuItemAttribute
,
(
Menu_Init_st_t
*
)
&
Menu_Init_st
);
}
...
...
@@ -76,6 +80,10 @@ void Menu_User_WAKEUP(void)
Menu_Init_st
.
enMenuItemLen
=
MENU_ITEM_MAX
;
Menu_Init_st
.
uintMenuConfig
=
0x0001
;
Menu_Init_st
.
uintMenuCursorMemoryDepth
=
0
;
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_DAYTIME
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_BACKLIGHT_4
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_UNIT_KM
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_LANGUAGE_CHINESE
,
1
);
Menu_Wake_Up_Init
((
uint8_t
*
)
u8MenuRamData
,
(
Menu_Item_Attribute_st_t
*
)
stMenuItemAttribute
,
(
Menu_Init_st_t
*
)
&
Menu_Init_st
);
}
...
...
@@ -326,12 +334,15 @@ void Menu_Logic_Operation_Bluetooth_Back(Menu_Key_en_t enKeyType)
void
Menu_Logic_Operation_Clock_Hour_Tenb
(
Menu_Key_en_t
enKeyType
)
{
// counter_val.time.RTC_Hours = (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit);
// counter_val.time.RTC_Minutes = (MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit);
// if(MENU_KEY_CONFIRM_SHORT == enKeyType)
// {
// RTC_SetTime(&counter_val.time);
// }
RTE_RTC_Get_CounterValue
(
&
counter_val
);
counter_val
.
time
.
RTC_Hours
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Hours
);
counter_val
.
time
.
RTC_Minutes
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Minutes
);
MenuData
.
Dis_Hour_Tenb
=
counter_val
.
time
.
RTC_Hours
/
10
;
MenuData
.
Dis_Hour_Bit
=
counter_val
.
time
.
RTC_Hours
%
10
;
MenuData
.
Dis_Minute_Tenb
=
counter_val
.
time
.
RTC_Minutes
/
10
;
MenuData
.
Dis_Minute_Bit
=
counter_val
.
time
.
RTC_Minutes
%
10
;
}
void
Menu_Logic_Operation_Clock_Hour_Bit
(
Menu_Key_en_t
enKeyType
)
...
...
@@ -371,11 +382,7 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
uint8_t
updataDir
=
0u
;
uint8_t
datmax
=
0u
;
uint8_t
datmin
=
0u
;
// RTE_RTC_Get_CounterValue(&counter_val);
// counter_val.time.RTC_Hours = RTC_Bcd2ToByte(counter_val.time.RTC_Hours);
// counter_val.time.RTC_Minutes = RTC_Bcd2ToByte(counter_val.time.RTC_Minutes);
// MenuData.Dis_Hour_Tenb = counter_val.time.RTC_Hours / 10;
if
(
enKeyType
==
MENU_KEY_DOWN_SHORT
)
{
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
8dec7321
...
...
@@ -68,6 +68,7 @@ static void Power_KL30_Init(void)
Menu_User_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
100
);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
}
...
...
@@ -110,7 +111,7 @@ static void Power_OVP_Init(void)
static
void
Power_IG_OFF_Init
(
void
)
{
Line_In_KL15_OFF_Init
();
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
0
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
}
static
void
Power_IG_ON_Init
(
void
)
...
...
@@ -168,18 +169,10 @@ static Power_Status_em Power_Stay_OFF(void)
}
else
{
if
((
Common_GetIgnOffTime
()
<
1
000
))
if
((
Common_GetIgnOffTime
()
<
20
000
))
{
u8PowerSts
=
EM_IGN_OFF
;
}
else
{
//igoff大于1s且下15电才进休眠,否则一直保持在igoff状态
//if(Sys_Read_KL15_Voltage() < 5000)
{
u8PowerSts
=
EM_IGN_Sleep_Init
;
}
}
}
return
u8PowerSts
;
...
...
@@ -195,7 +188,7 @@ static Power_Status_em Power_Stay_Protect(void)
/* 关闭所有外设,坪保留AD采集,电溝状思切�? */
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Disable
);
//
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
}
u8PowerSts
=
EM_IGN_OFF_Init
;
/* 电溝模弝正常 */
...
...
@@ -208,15 +201,10 @@ static Power_Status_em Power_Stay_Protect(void)
if
(
SYS_OPR_STAT_RUN
)
{
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
//
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
return
u8PowerSts
;
}
//进入异常电压,电源库里直接将15电等于0,则直接退出,状态是igoff,下15则进入休眠
// if ( SYS_OPR_STAT_IGN_OFF )
// {
// break;
// }
}
}
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/TrmerM/TrmerM.c
View file @
8dec7321
This diff is collapsed.
Click to expand it.
Firmware/Source/System/Sys_Task_List.c
View file @
8dec7321
...
...
@@ -5,6 +5,7 @@
#include "RTE.h"
#include "UDS_ISO14229_Server.h"
#include "FaultCode.h"
extern
_Menu_Data
MenuData
;
void
Sys_Pseudo_Real_Time_Tasks
(
void
)
{
...
...
@@ -54,17 +55,17 @@ void Sys_50ms_Tasks(void)
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
//
if((MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit) > 23)
//
{
//
MenuData.Dis_Hour_Tenb = 2;
//
MenuData.Dis_Hour_Bit = 3;
//
}
if
((
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
)
>
23
)
{
MenuData
.
Dis_Hour_Tenb
=
2
;
MenuData
.
Dis_Hour_Bit
=
3
;
}
//
if((MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit) > 59)
//
{
//
MenuData.Dis_Minute_Tenb = 5;
//
MenuData.Dis_Minute_Bit = 9;
//
}
if
((
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
)
>
59
)
{
MenuData
.
Dis_Minute_Tenb
=
5
;
MenuData
.
Dis_Minute_Bit
=
9
;
}
}
uint32_t
ODOtest
=
0
;
...
...
@@ -83,6 +84,8 @@ void Sys_100ms_Tasks(void)
//Data_Mileage_Clear();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
BackLight_Process
();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
// aaa = Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO);
}
...
...
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