Commit afe9affd authored by 何锐's avatar 何锐

feat:初步完成报文指示灯,硬线指示灯,燃油表水温表

parent 307d6b49
......@@ -52,8 +52,6 @@ extern uint8_t ruanjianbanbenhao[8];
void Get_PN_msg(void);
extern void Get_UID_msg(void);
void change_UDS_DID(void);
void resetchangeUDSfuc(void);
void resetpowerfuel(void);
void UIDWrite(void);
extern uint8_t UIDcode1[33];
extern uint8_t UIDcode2[33];
......
......@@ -72,7 +72,6 @@ extern Key_Real_Status_en_t enKeyLeftRealStatus;
extern Key_Real_Status_en_t enKeyRightRealStatus;
/*------------------------------------------------------------------------------------*/
extern uint8_t IG_OFF_Flag;
extern void Key_Init(void);
extern void Key_Service(void); /*10ms*/
......
......@@ -93,14 +93,6 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(POWER_CTRL_KL15)
{
POWER_CTRL_KL15 = 0;
}
else
{
POWER_CTRL_KL15 = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -129,17 +121,12 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{
}
}
uint8_t IG_OFF_Flag;
void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
/*清零ODO*/
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
MENU_CHECK_STEP_ADD( );
if((MENU_CHECK_STEP < 6) && (MENU_CHECK_STEP > 0))
{
IG_OFF_Flag = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -179,7 +166,7 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
}
else if (( enKeyEvent == KEY_EVENT_LONG_PRESS ) && (MENU_CHECK_STEP == 10))
{
LINE_OUT_NEG_02 = 1;
}
}
......
......@@ -80,46 +80,62 @@
// #define LINE_SafeBelt_5_press NEG_9_Ctrl
//左转
#define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
//右转
// //左转
// #define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
// //右转
// #define LINE_OUT_POS_01 GPIO_OUT_PORT10_PIN06
// //远光
// #define LINE_OUT_POS_02 GPIO_OUT_PORT09_PIN00
// //位置灯
// #define LINE_OUT_POS_03 GPIO_OUT_APORT00_PIN04
// #define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06
// #define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13
// #define LINE_OUT_POS_07 GPIO_OUT_APORT00_PIN14
// #define LINE_OUT_POS_08 GPIO_OUT_PORT08_PIN09
// #define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08
// #define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07
// //安全带//R挡
// #define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06
// //机油压力//L挡
// #define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05
// //H挡//发动机故障
// #define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04
// //P挡//驻车指示灯
// #define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03
// //开关后桥状态//制动失效
// #define LINE_OUT_NEG_05 GPIO_OUT_PORT09_PIN02
// //马达2驱信号
// #define LINE_OUT_NEG_06 GPIO_OUT_PORT09_PIN01
// //马达4驱信号//空挡
// #define LINE_OUT_NEG_07 GPIO_OUT_PORT10_PIN07
// //马达4驱锁死信号
// #define LINE_OUT_NEG_08 GPIO_OUT_PORT10_PIN03
// //开关2驱信号
// #define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04
// //B-5开关4驱信号
// #define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
// #define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
// #define LINE_FUEL_RES02 GPIO_OUT_PORT08_PIN12
// #define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
// #define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11
//正控1
#define LINE_OUT_POS_01 GPIO_OUT_PORT10_PIN06
//远光
//正控2
#define LINE_OUT_POS_02 GPIO_OUT_PORT09_PIN00
//位置灯
//正控3
#define LINE_OUT_POS_03 GPIO_OUT_APORT00_PIN04
#define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06
#define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13
#define LINE_OUT_POS_07 GPIO_OUT_APORT00_PIN14
#define LINE_OUT_POS_08 GPIO_OUT_PORT08_PIN09
#define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08
#define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07
//安全带//R挡
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06
//机油压力//L挡
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05
//H挡//发动机故障
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04
//P挡//驻车指示灯
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03
//开关后桥状态//制动失效
#define LINE_OUT_NEG_05 GPIO_OUT_PORT09_PIN02
//马达2驱信号
#define LINE_OUT_NEG_06 GPIO_OUT_PORT09_PIN01
//马达4驱信号//空挡
#define LINE_OUT_NEG_07 GPIO_OUT_PORT10_PIN07
//马达4驱锁死信号
#define LINE_OUT_NEG_08 GPIO_OUT_PORT10_PIN03
//开关2驱信号
#define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04
//B-5开关4驱信号
#define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
#define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
#define LINE_FUEL_RES02 GPIO_OUT_PORT08_PIN12
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
#define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11
//正控4
#define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
//负控3
#define LINE_OUT_POS_05 GPIO_OUT_PORT09_PIN04
//负控4
#define LINE_OUT_POS_06 GPIO_OUT_PORT09_PIN03
//负控10
#define LINE_OUT_POS_07 GPIO_OUT_PORT00_PIN08
//zh:
......
......@@ -65,43 +65,11 @@ extern uint8_t SWtestresult;
extern uint8_t HWtestresult;
extern uint8_t PNtestresult;
extern uint8_t resetflag;
extern uint8_t fuelreset1;
extern uint8_t fuelreset2;
extern uint8_t fuelreset3;
extern uint8_t fuelreset4;
void Sys_Run_Mode_10ms_Tasks_Group(void)
{
if(MENU_CHECK_STEP == 1 && fuelreset1 == 0)
{
fuelreset1 = 1;
}
else if(MENU_CHECK_STEP == 2 && fuelreset2 == 0)
{
fuelreset2 = 1;
}
else if(MENU_CHECK_STEP == 3 && fuelreset3 == 0)
{
fuelreset3 = 1;
}
else if(MENU_CHECK_STEP == 4 && fuelreset4 == 0)
{
fuelreset4 = 1;
}
if(MENU_CHECK_STEP == 0)
{
fuelreset1 = 0;
fuelreset2 = 0;
fuelreset3 = 0;
fuelreset4 = 0;
}
if(fuelreset1 == 1 || fuelreset2 == 1 || fuelreset3 == 1 || fuelreset4 == 1)
{
resetpowerfuel();
}
BusOff_Service( );
Key_Service( );
resetchangeUDSfuc();
if(fakedelay < 100)
{
fakedelay++;
......@@ -237,21 +205,6 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Buzzer_Start();
Total_Check( );
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
if(IG_OFF_Flag)
{
if(delay_time < 5)
{
POWER_CTRL_KL15 = 0u; //KL15
delay_time++;
}
else
{
delay_time = 0;
IG_OFF_Flag = 0;
POWER_CTRL_KL15 = 1u; //KL15
}
}
}
/*=================================================================*/
......
......@@ -85,7 +85,6 @@ void Sys_Startup_Init(void)
UIDdelay = 0;
POWER_CTRL_KL30 = 1u; //B+
POWER_CTRL_KL15 = 1u; //KL15
LINE_OUT_NEG_02 = 0;
for (int i = 0; i < 33; i++)
{
UIDcode1[i] = 0;
......
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