Commit e238db9b authored by 时昊's avatar 时昊

Merge branch 'wangyanan' into 'dev'

 feat:修改背光设置、单位设置、语言设置的一级菜单和二级菜单显示函数+修改灯和硬线触发条件

See merge request !13
parents 2ec140ad cc61289f
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,34 +12,42 @@ typedef enum ...@@ -12,34 +12,42 @@ typedef enum
PIC_Max, PIC_Max,
}_Picture_Mode; }_Picture_Mode;
/*日间夜间自动*/ /*显示模式*/
typedef enum typedef enum
{ {
ModeDAY =0 ,//日间中文 ModeDAY =0 ,/*日间*/
ModeNIGHT , ModeNIGHT ,
ModeATUO, ModeATUO,
}_g_u8Display_Mode; }_g_u8Display_Mode;
/*语言设置*/ /*语言设置*/
typedef enum typedef enum
{ {
CH = 0, CH = 0,/*中文*/
EN , EN ,
}_g_u8Language; }_g_u8Language;
/*背光设置*/
typedef enum typedef enum
{ {
Backlight_1 =0 , Backlight_5 = 0 ,
Backlight_2 ,
Backlight_3 ,
Backlight_4 , Backlight_4 ,
Backlight_5, Backlight_3 ,
Backlight_2 ,
Backlight_1,
Backlight_ATUO, Backlight_ATUO,
}_g_u8Backlight; }_g_u8Backlight;
typedef enum
{
Metric = 0,/*公制*/
Imperial ,
}_g_u8UnitSetting;
extern void AMT630H_GUI_DisplayProc(void); extern void AMT630H_GUI_DisplayProc(void);
......
...@@ -33,5 +33,8 @@ ...@@ -33,5 +33,8 @@
#include "RTC\RTE_RTC.h" #include "RTC\RTE_RTC.h"
#include "CAN_Signal\CAN_Lib.h" #include "CAN_Signal\CAN_Lib.h"
#include "CAN_CH0_CAN_Communication_Matrix.h" #include "CAN_CH0_CAN_Communication_Matrix.h"
#include "Telltales\Telltales_user.h"
#include "Telltales\Telltales_Lib.h"
#endif #endif
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] = const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{ {
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Left, }, {LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Left, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Right, }, {LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Turn_Right, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_High_Beam, }, {LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_High_Beam, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Efi_Fault, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Efi_Fault, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_ABS, }, {LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_ABS, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Auto_Start_Stop, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Auto_Start_Stop, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Oil_Pressure_Alert, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Oil_Pressure_Alert, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Voltage, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Voltage, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Fuel_Level_Low, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Fuel_Level_Low, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_E, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_E, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_S, }, {LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_S, },
}; };
Linelib_uint8_t Get_LINE_IN_Turn_Left(void) Linelib_uint8_t Get_LINE_IN_Turn_Left(void)
{ {
...@@ -33,7 +33,7 @@ Linelib_uint8_t Get_LINE_IN_Turn_Left(void) ...@@ -33,7 +33,7 @@ Linelib_uint8_t Get_LINE_IN_Turn_Left(void)
Linelib_uint8_t Get_LINE_IN_Turn_Right(void) Linelib_uint8_t Get_LINE_IN_Turn_Right(void)
{ {
Linelib_uint8_t ret = 0U; Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT)) if (RTE_GPIO_Get_Level(RightTurn_MUC_OUT))
{ {
ret = 1u; ret = 1u;
} }
...@@ -46,7 +46,7 @@ Linelib_uint8_t Get_LINE_IN_Turn_Right(void) ...@@ -46,7 +46,7 @@ Linelib_uint8_t Get_LINE_IN_Turn_Right(void)
Linelib_uint8_t Get_LINE_IN_High_Beam(void) Linelib_uint8_t Get_LINE_IN_High_Beam(void)
{ {
Linelib_uint8_t ret = 0U; Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT)) if (RTE_GPIO_Get_Level(HighBeam_P_In))
{ {
ret = 1u; ret = 1u;
} }
...@@ -59,7 +59,7 @@ Linelib_uint8_t Get_LINE_IN_High_Beam(void) ...@@ -59,7 +59,7 @@ Linelib_uint8_t Get_LINE_IN_High_Beam(void)
Linelib_uint8_t Get_LINE_IN_Efi_Fault(void) Linelib_uint8_t Get_LINE_IN_Efi_Fault(void)
{ {
Linelib_uint8_t ret = 0U; Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT)) if (RTE_GPIO_Get_Level(Engine_Failure_MCU))
{ {
ret = 1u; ret = 1u;
} }
...@@ -72,7 +72,7 @@ Linelib_uint8_t Get_LINE_IN_Efi_Fault(void) ...@@ -72,7 +72,7 @@ Linelib_uint8_t Get_LINE_IN_Efi_Fault(void)
Linelib_uint8_t Get_LINE_IN_ABS(void) Linelib_uint8_t Get_LINE_IN_ABS(void)
{ {
Linelib_uint8_t ret = 0U; Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT)) if (RTE_GPIO_Get_Level(ABS_Faulty_lights))
{ {
ret = 1u; ret = 1u;
} }
......
...@@ -98,6 +98,7 @@ static void LED_Turn_Left_Execution(Tellib_uint16_t led_status) ...@@ -98,6 +98,7 @@ static void LED_Turn_Left_Execution(Tellib_uint16_t led_status)
// RTE_GPIO_Set_Level(TurnLeft_MUC_OUT, LED_LINEOUT_Low); // RTE_GPIO_Set_Level(TurnLeft_MUC_OUT, LED_LINEOUT_Low);
// } // }
} }
/*硬线-P9 高电平*/ /*硬线-P9 高电平*/
static Tellib_uint16_t LED_Turn_Right_Judgement(void) static Tellib_uint16_t LED_Turn_Right_Judgement(void)
{ {
...@@ -189,14 +190,14 @@ static Tellib_uint16_t LED_ABS_Judgement(void) ...@@ -189,14 +190,14 @@ static Tellib_uint16_t LED_ABS_Judgement(void)
} }
static void LED_ABS_Execution(Tellib_uint16_t led_status) static void LED_ABS_Execution(Tellib_uint16_t led_status)
{ {
// if (led_status == 1u) // if (led_status == 1u)
// { // {
// RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_High); // RTE_GPIO_Set_Level(OilPressureAlert_MUC_OUT, LED_LINEOUT_High);
// } // }
// else // else
// { // {
// RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_Low); // RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_Low);
// } // }
} }
/*硬线-P12 低电平*/ /*硬线-P12 低电平*/
static Tellib_uint16_t LED_Auto_Start_Stop_Judgement(void) static Tellib_uint16_t LED_Auto_Start_Stop_Judgement(void)
...@@ -284,23 +285,24 @@ static void LED_TCS_Execution(Tellib_uint16_t led_status) ...@@ -284,23 +285,24 @@ static void LED_TCS_Execution(Tellib_uint16_t led_status)
/*信号来源:ISG_111*/ /*信号来源:ISG_111*/
static Tellib_uint16_t LED_HEV_Judgement(void) static Tellib_uint16_t LED_HEV_Judgement(void)
{ {
//Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
//if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x402_Msg_Count) == CAN_SIG_LOST) if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_111_Msg_Count) == CAN_SIG_LOST)
//{ {
// LED_STATE = 0u; LED_STATE = 0u;
//} }
//else else
//{ {
// if( == 1)
// { if(Get_CAN_CH0_ID_111_Sig_ISG_Ready() == 0x01UL)
// LED_STATE = 1u; {
// } LED_STATE = 1u;
// else }
// { else
// LED_STATE = 0u; {
// } LED_STATE = 0u;
//} }
//return LED_STATE; }
return LED_STATE;
} }
static void LED_HEV_Execution(Tellib_uint16_t led_status) static void LED_HEV_Execution(Tellib_uint16_t led_status)
{ {
......
#ifndef TELLTALES_USER_H #ifndef TELLTALES_USER_H
#define TELLTALES_USER_H #define TELLTALES_USER_H
#include "Telltales_Lib.h"
typedef enum typedef enum
{ {
em_LED_Turn_Left, em_LED_Turn_Left,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment