Commit cc61289f authored by 王雅楠's avatar 王雅楠

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

parent 2ec140ad
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,34 +12,42 @@ typedef enum
PIC_Max,
}_Picture_Mode;
/*日间夜间自动*/
/*显示模式*/
typedef enum
{
ModeDAY =0 ,//日间中文
ModeDAY =0 ,/*日间*/
ModeNIGHT ,
ModeATUO,
}_g_u8Display_Mode;
/*语言设置*/
typedef enum
{
CH = 0,
CH = 0,/*中文*/
EN ,
}_g_u8Language;
/*背光设置*/
typedef enum
{
Backlight_1 =0 ,
Backlight_2 ,
Backlight_3 ,
Backlight_5 = 0 ,
Backlight_4 ,
Backlight_5,
Backlight_3 ,
Backlight_2 ,
Backlight_1,
Backlight_ATUO,
}_g_u8Backlight;
typedef enum
{
Metric = 0,/*公制*/
Imperial ,
}_g_u8UnitSetting;
extern void AMT630H_GUI_DisplayProc(void);
......
......@@ -33,5 +33,8 @@
#include "RTC\RTE_RTC.h"
#include "CAN_Signal\CAN_Lib.h"
#include "CAN_CH0_CAN_Communication_Matrix.h"
#include "Telltales\Telltales_user.h"
#include "Telltales\Telltales_Lib.h"
#endif
......@@ -5,17 +5,17 @@
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_HIGH, LEVEL_LOW, 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, 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_Auto_Start_Stop, },
{LEVEL_LOW, LEVEL_HIGH, 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_LOW, LEVEL_HIGH, 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_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_S, },
{LEVEL_LOW, LEVEL_HIGH, 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_Right, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_High_Beam, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Efi_Fault, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_ABS, },
{LEVEL_HIGH, LEVEL_LOW, 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_Oil_Pressure_Alert, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Voltage, },
{LEVEL_HIGH, LEVEL_LOW, 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_E, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_S, },
};
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 ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT))
if (RTE_GPIO_Get_Level(RightTurn_MUC_OUT))
{
ret = 1u;
}
......@@ -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 ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT))
if (RTE_GPIO_Get_Level(HighBeam_P_In))
{
ret = 1u;
}
......@@ -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 ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT))
if (RTE_GPIO_Get_Level(Engine_Failure_MCU))
{
ret = 1u;
}
......@@ -72,7 +72,7 @@ Linelib_uint8_t Get_LINE_IN_Efi_Fault(void)
Linelib_uint8_t Get_LINE_IN_ABS(void)
{
Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(LeftTurn_MUC_OUT))
if (RTE_GPIO_Get_Level(ABS_Faulty_lights))
{
ret = 1u;
}
......
......@@ -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);
// }
}
/*硬线-P9 高电平*/
static Tellib_uint16_t LED_Turn_Right_Judgement(void)
{
......@@ -189,14 +190,14 @@ static Tellib_uint16_t LED_ABS_Judgement(void)
}
static void LED_ABS_Execution(Tellib_uint16_t led_status)
{
// if (led_status == 1u)
// {
// RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_High);
// }
// else
// {
// RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_Low);
// }
// if (led_status == 1u)
// {
// RTE_GPIO_Set_Level(OilPressureAlert_MUC_OUT, LED_LINEOUT_High);
// }
// else
// {
// RTE_GPIO_Set_Level(ABS_MUC_OUT, LED_LINEOUT_Low);
// }
}
/*硬线-P12 低电平*/
static Tellib_uint16_t LED_Auto_Start_Stop_Judgement(void)
......@@ -284,23 +285,24 @@ static void LED_TCS_Execution(Tellib_uint16_t led_status)
/*信号来源:ISG_111*/
static Tellib_uint16_t LED_HEV_Judgement(void)
{
//Tellib_uint16_t LED_STATE = 0u;
//if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x402_Msg_Count) == CAN_SIG_LOST)
//{
// LED_STATE = 0u;
//}
//else
//{
// if( == 1)
// {
// LED_STATE = 1u;
// }
// else
// {
// LED_STATE = 0u;
// }
//}
//return LED_STATE;
Tellib_uint16_t LED_STATE = 0u;
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_111_Msg_Count) == CAN_SIG_LOST)
{
LED_STATE = 0u;
}
else
{
if(Get_CAN_CH0_ID_111_Sig_ISG_Ready() == 0x01UL)
{
LED_STATE = 1u;
}
else
{
LED_STATE = 0u;
}
}
return LED_STATE;
}
static void LED_HEV_Execution(Tellib_uint16_t led_status)
{
......
#ifndef TELLTALES_USER_H
#define TELLTALES_USER_H
#include "Telltales_Lib.h"
typedef enum
{
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