Commit c6a0b88a authored by 时昊's avatar 时昊

按LE19变更单更改

parent 9657322e
......@@ -52,7 +52,7 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* 高压报警 */{ 20u, POPUP_WeightOverload, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_WeightOverload, POPUP_MODE_SINGLE, 11u, 10u, },
/* 高压报警 */{ 20u, POPUP_WeightOverload2, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_WeightOverload2, POPUP_MODE_SINGLE, 11u, 10u, },
/* 远程锁车 */{ 21u, POPUP_RemoteLocking, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RemoteLocking, POPUP_MODE_SINGLE, 11u, 10u, },
/* 小灯未关 */{ 22u, POPUP_PositionNotClosed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_PositionNotClosed, POPUP_MODE_MULTI, 600u, 10u, },
/* 小灯未关 */{ 22u, POPUP_PositionNotClosed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_PositionNotClosed, POPUP_MODE_SINGLE, 600u, 10u, },
/* 驾驶员离车提醒 */{ 23u, POPUP_DepartureReminder, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_DepartureReminder, POPUP_MODE_SINGLE, 30u, 10u, },
/* OTA 报警0 */{ 22u, POPUP_OTA_0, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_0, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警1 */{ 22u, POPUP_OTA_1, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_1, POPUP_MODE_SINGLE, 11u, 10u, },
......@@ -61,7 +61,7 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* OTA 报警4 */{ 22u, POPUP_OTA_4, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_4, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_OTA_5, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_5, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_ESC, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_ESC, POPUP_MODE_SINGLE, 11u, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_LONG_HINT, SND_Over_Speed, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Over_Speed, POPUP_MODE_MULTI, 11u, 10u, },
/*==========================================================================================================================================================================================================================================*/
};
......
......@@ -442,11 +442,11 @@ void Popups_Polling(void)
//超速报警
if(IGstPopup1 == IGN_ON)
{
if ( m_Vspeed >= 860 )
if ( m_Vspeed >= 810 )
{
Popup_Request(POPUP_Over_Speed);
}
if(m_Vspeed < 830)
if(m_Vspeed < 780)
{
PopupAndSound_Delete(POPUP_Over_Speed);
}
......
......@@ -118,7 +118,7 @@ const SndAttributeStruct SndAttributeTable [ SND_SRC_TOTAL_NUM ] = {
{ /* OTA 报警4 */ 0x07, 4u, 1u, SND_MODE_SINGLE, 1000u, },
{ /* OTA 报警5 */ 0x07, 4u, 240u, SND_MODE_SINGLE, 250u, },
{ /* ESC 报警4 */ 0x07, 4u, 1u, SND_MODE_SINGLE, 1000u, },
{ /* 超速报警 1HZ */ 0x07, 13u, SND_CYCLE_NONSTOP, SND_MODE_SINGLE, 1000u, },
{ /* 超速报警 1HZ */ 0x07, 13u, 4, SND_MODE_SINGLE, 1000u, },
/*===========================================================================================================================================*/
};
......
......@@ -22,6 +22,9 @@ uint8_t EnergyRecovery_send = 0;
//---------yuan--------//
uint8_t DUSdate_out[3] = {0};
extern uint8_t DID_F193[];
extern uint8_t Ser22_DID_F195[];
extern uint8_t Ser22_DID_F18B[];
const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] =
{ //ID Cycle Cycleoffset SendCnt pro dlc
{0x18FDA517ul, 100ul * 1000ul, 0ul, 0u, MSG_EXT, 2u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_18FDA517, (void *)0},
......@@ -143,16 +146,23 @@ void Can_Set_Buff_18FEDA17(canlib_uint8_t *CopyData)
uint8_T IC_SWCompileMonth = 0; //IC软件编译完成日期(月)
uint8_T IC_SWCompileDay = 0; //IC软件编译完成日期(日)
IC_HardwareMajorVer = 1;
IC_HardwareMinorVer = 1;
IC_HardwareMajorVer = DID_F193[4];
IC_HardwareMinorVer = DID_F193[8];
IC_SoftwareMajorVer = 1;
IC_SoftwareMinorVer = 2;
IC_SoftwareMajorVer = Ser22_DID_F195[4];
IC_SoftwareMinorVer = Ser22_DID_F195[8];
IC_SWCompileYear_H = Ser2EToDFlashInfo.DID_F1A2[0];
IC_SWCompileYear_L = Ser2EToDFlashInfo.DID_F1A2[1];
IC_SWCompileMonth = Ser2EToDFlashInfo.DID_F1A2[2];
IC_SWCompileDay = Ser2EToDFlashInfo.DID_F1A2[3];
if((IC_HardwareMajorVer >= 0x30)&&(IC_HardwareMinorVer >= 0x30)&&(IC_SoftwareMajorVer >= 0x30)&&(IC_SoftwareMinorVer >= 0x30))
{
IC_HardwareMajorVer -= 0x30;//48
IC_HardwareMinorVer -= 0x30;//48
IC_SoftwareMajorVer -= 0x30;//48
IC_SoftwareMinorVer -= 0x30;//48
}
IC_SWCompileYear_H = Ser22_DID_F18B[0];
IC_SWCompileYear_L = Ser22_DID_F18B[1];
IC_SWCompileMonth = Ser22_DID_F18B[2];
IC_SWCompileDay = Ser22_DID_F18B[3];
Service += (((IC_SWCompileYear_H & 0xF0)>>4) * 1000);
Service += (((IC_SWCompileYear_H & 0x0F)>>0) * 100);
......
......@@ -75,6 +75,7 @@ static uint8_t Gear_keep_current = 0;
uint16_t PowerOn_Scan_Timing = 0;
uint16_t PowerOn_Scan_Flag = 1;
//uint16_t Gauge_VSpeed_Display_Flag = 0;
uint16_t Gauge_VSpeed_Display_Flag = 0;
/**************************************************************************
* \brief ���ٱ���ʾ����
* \attention �÷��������뱻ʵʱ����
......@@ -89,20 +90,34 @@ void Gauge_VSpeed_Display(void)
if ( Common_Get_Disp_V_Speed_Valid( ) == 1u )
{
//��ʾ����
// refresh_timer++;
VSpeedDisplayValue = Common_Get_Disp_V_Speed( ) / 10u;
VSpeedDisplayValue = Common_Get_Disp_V_Speed( );
if(Factory_ClearOdo_Display_Flag == 0)
{
//if(VSpeedDisplayValue > 188)
//{
// SEG_SET_VSpeed_NUM(2u, 0u);
//
//}
//else
//{
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue);
//}
if(Common_Get_Disp_V_Speed( ) >= 810)
{
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 1;
}
else
{
if(Gauge_VSpeed_Display_Flag == 1)
{
if(Common_Get_Disp_V_Speed( ) < 780)
{
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 0;
}
else
{
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
}
}
else
{
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 0;
}
}
}
}
else
......@@ -110,7 +125,7 @@ void Gauge_VSpeed_Display(void)
//�����������
VSpeedDisplayValue = 0u;
SEG_SET_VSpeed_NUM(2u, 0u);
Gauge_VSpeed_Display_Flag = 0;
}
}
else
......@@ -118,6 +133,7 @@ void Gauge_VSpeed_Display(void)
// IGOFFʱ����
VSpeedDisplayValue = 0u;
SEG_SET_VSpeed_NUM(0u, 0u);
Gauge_VSpeed_Display_Flag = 0;
}
}
......@@ -534,7 +550,9 @@ void Gauge_EnergyRecoveryLevel_Display(void)
{
if(Factory_ClearOdo_Display_Flag == 0)
{
SEG_SET_L8_NUM(1u, EnergyRecovery_Key_val());
EnergyRecovery_Key_val();
EnergyRecovery0_Key_val();
SEG_SET_L8_NUM(1u,EnergyRecovery_Level);
}
}
......
......@@ -181,9 +181,9 @@ void Line_In_Debounce_Service(void)
{
if (LineInEnable != 0u)
{
Line_In_Debounce( LINE_IN_MaintainWarning, Get_Line_In_MaintainWarning());
Line_In_Debounce( LINE_IN_MaintainWarning, Get_Line_In_MaintainWarning());//没用
Line_In_Debounce( LINE_IN_BRAKEFLUID, Get_Line_In_BrakeFluid());
Line_In_Debounce( LINE_IN_OTA_SWITCH, Get_Line_In_OTA_Switch());
Line_In_Debounce( LINE_IN_OTA_SWITCH, Get_Line_In_OTA_Switch());//L0L1L2
Line_In_Debounce( LINE_IN_TRIP_SWITCH, Get_Line_In_TRIP_Switch());
Line_In_Debounce( LINE_IN_SEATBELT_DR, Get_Line_In_SEATBELT_DR());
Line_In_Debounce( LINE_IN_TURNLEFT, Get_Line_In_TurnLeft());
......@@ -196,7 +196,7 @@ void Line_In_Debounce_Service(void)
Line_In_Debounce( LINE_IN_HANDBRAKE, Get_Line_In_Handbrake());
Line_In_Debounce( LINE_IN_SOC_CC, Get_Line_In_SOC_CC());
Line_In_Debounce( LINE_IN_DOOROPEN, Get_Line_In_DoorOpen());
Line_In_Debounce( LINE_IN_ENERGY_RECOVERY, Get_Line_In_Energy_Recovery());//sh
Line_In_Debounce( LINE_IN_ENERGY_RECOVERY, Get_Line_In_Energy_Recovery());//sh //前雾灯
}
}
/*获取当前硬线状态*/
......
......@@ -8,18 +8,19 @@
MMIKeyStruct MMIKey;
uint8_t Key_SW_OTA;
uint8_t Key_SW_EnergyRecovery;
uint8_t Key_SW_EnergyRecovery0;
uint8_t Int_Trip;
uint8_t Ext_Trip;
uint8_t Key_OTA;
uint8_t Key_EnergyRecovery;
uint8_t Key_EnergyRecovery0;
uint8_t OTA_Key;
uint8_t EnergyRecovery_Key;
uint8_t EnergyRecovery0_Key;
uint8_t Key_SW_OTA_Timer;
uint8_t Key_SW_EnergyRecovery_Timer;
uint8_t Key_SW_EnergyRecovery0_Timer;
uint8_t EnergyRecovery_Level = 2;
/*uint8_t Key_sts;
......@@ -53,6 +54,17 @@ void OTA_Key_Status(void)
}
}
void EnergyRecovery0_Key_Status(void)
{
if ( Key_EnergyRecovery0 != MMI_KEY_IDLE )
{
EnergyRecovery0_Key = Key_EnergyRecovery0;
}
else
{
}
}
void EnergyRecovery_Key_Status(void)
{
if ( Key_EnergyRecovery != MMI_KEY_IDLE )
......@@ -89,6 +101,7 @@ void MMI_Key_DetectHadnleCb10ms(void)
{
OTA_Key_Detect( );
EnergyRecovery_Key_Detect();
EnergyRecovery0_Key_Detect();
}
void OTA_Key_Detect(void)
......@@ -204,6 +217,66 @@ void EnergyRecovery_Key_Detect(void)
return EnergyRecovery_Level;
}
void EnergyRecovery0_Key_Detect(void)
{
if ( SYS_OPR_STAT_IGN_ON )
{
Key_SW_EnergyRecovery0 = Get_Line_In_Energy_Recovery0();
if ( Key_SW_EnergyRecovery0 == 0u )
{
if ( Key_SW_EnergyRecovery0_Timer < 255u )
{
Key_SW_EnergyRecovery0_Timer++;
}
if ( Key_SW_EnergyRecovery0_Timer >= 200u ) /*长按判断*/
{
Key_EnergyRecovery0 = MMI_KEY_HOLD; /*长按TRIP*/
}
else
{
Key_EnergyRecovery0 = MMI_KEY_IDLE; /*按键抬起*/
}
}
else if ( Key_SW_EnergyRecovery0 == 1u )
{
if ( (Key_SW_EnergyRecovery0_Timer > 50u) && (Key_SW_EnergyRecovery0_Timer < 200u) )
{
Key_EnergyRecovery0 = MMI_KEY_PRESS; /*短按TRIP*/
}
else
{
Key_EnergyRecovery0 = MMI_KEY_IDLE; /*按键抬起*/
}
Key_SW_EnergyRecovery0_Timer = 0u;
}
else
{
Key_SW_EnergyRecovery0_Timer = 0u;
Key_EnergyRecovery0 = MMI_KEY_IDLE;
}
}
else
{
Key_SW_EnergyRecovery0_Timer = 0u;
Key_EnergyRecovery0 = MMI_KEY_IDLE;
}
EnergyRecovery0_Key_Status( );
}
uint8_t EnergyRecovery0_Key_val(void)
{
if (MMI_KEY_PRESS == EnergyRecovery0_Key)
{
EnergyRecovery0_Key = MMI_KEY_IDLE;
EnergyRecovery_Level = 0;
}
return EnergyRecovery_Level;
}
static void btn_Ext_Trip_cb(button_event_t event)
{
switch ( event )
......
......@@ -49,8 +49,11 @@ void OTA_Key_Detect(void);
void HW_Key_KL30_Wakeup_Init(void);
void ClearNOuseButton(void); /*清理按键*/
void EnergyRecovery_Key_Status(void);
void EnergyRecovery0_Key_Status(void);
void OTA_Key_Status(void);
void EnergyRecovery_Key_Detect(void);
void EnergyRecovery0_Key_Detect(void);
uint8_t EnergyRecovery_Key_val(void);
uint8_t EnergyRecovery0_Key_val(void);
#endif
\ No newline at end of file
......@@ -214,3 +214,17 @@ _LINE_IN_TriggerLevel_ Get_Line_In_Energy_Recovery(void)//sh
}
return Res;
}
_LINE_IN_TriggerLevel_ Get_Line_In_Energy_Recovery0(void)
{
_LINE_IN_TriggerLevel_ Res = LEVEL_LOW;
if(Line_In_Energy_Recovery0 == 1u)
{
Res = LEVEL_HIGH;
}
else
{
Res = LEVEL_LOW;
}
return Res;
}
\ No newline at end of file
......@@ -24,5 +24,6 @@ _LINE_IN_TriggerLevel_ Get_Line_In_Handbrake(void);
_LINE_IN_TriggerLevel_ Get_Line_In_SOC_CC(void);
_LINE_IN_TriggerLevel_ Get_Line_In_DoorOpen(void);
_LINE_IN_TriggerLevel_ Get_Line_In_Energy_Recovery(void);
_LINE_IN_TriggerLevel_ Get_Line_In_Energy_Recovery0(void);
void Gpio_Test(void);
#endif
\ No newline at end of file
......@@ -1198,7 +1198,7 @@ static Tellib_uint16_t LED_SOC_CC_Judge(void)
Tellib_uint16_t res = 0u;
if(Factory_ClearOdo_Display_Flag == 0)
{
if((CAN_MSG_Status(ID_can0x18FA3EF4_Msg_Count) == 0)&&(CAN_MSG_Status(ID_can0x18FA7049_Msg_Count) == 0))
if((CAN_MSG_Status(ID_can0x18FA3EF4_Msg_Count) == 0)||(CAN_MSG_Status(ID_can0x18FA7049_Msg_Count) == 0))
{
if(Get_ID_18FA3EF4_Sig_BMSDCChgPlugSts( ) == 1)
{
......
......@@ -27,19 +27,19 @@ BootToDFlashInfoUnion BootToDFlashInfo;
Ser2EToDFlashInfoUnion Ser2EToDFlashInfo;
DTCToDFlashInfoUnion DTCToDFlashInfo;
const uint8_t DID_F180[16]= {'1','0','3',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const uint8_t DID_F187[21]={'9','9','0','0','1','2','5','3','9','6',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const uint8_t DID_F189[16]={'0','0','1','.','0','0','2',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的软件版本编号
const uint8_t DID_F187[21]={'9','9','0','0','1','6','2','7','4','4',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
const uint8_t DID_F189[16]={'0','0','1','.','0','0','1',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的软件版本编号
const uint8_t DID_F191[16]={'0','0','1','.','0','0','1',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};//主机厂定义的硬件版本编号
const uint8_t DID_F193[16]={'H','V','0','0','1','.','0','0','1',0x20,0x20,0x20,0x20,0x20,0x20,0x20};//供应商定义的硬件版本编号
const uint8_t DID_F199[4]={0x20u,0x23u,0x02u,0x24u};
const uint8_t DID_F112[8]={'L','G','0','2','Y',0x20,0x20,0x20};
const uint8_t DID_F112[8]={'L','E','1','9',0x20,0x20,0x20,0x20};
const uint8_t Ser22_DID_F113[4] = {0x04, 0x04, 0x04, 0x04};
const uint8_t Ser22_DID_F182[16] = "0100000000000000";
const uint8_t Ser22_DID_F18A[6] = {'4', '5', '1', '0', '0', '3'};
const uint8_t Ser22_DID_F18B[4] = {0x20, 0x23, 0x02, 0x24};
const uint8_t Ser22_DID_F18C[24] = "0000";
const uint8_t Ser22_DID_F195[16] = "SV001.002 ";//供应商定义的软件版本编号
const uint8_t Ser22_DID_F195[16] = "SV001.001 ";//供应商定义的软件版本编号
const uint8_t Ser22_DID_F1A2[4] ={0x20,0x23,0x02,0x24};
/*const uint8_t Ser22_DID_F1AA[8];
const uint8_t Ser22_DID_F1AE[] = "";
......
......@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by GPIO configuration tool.
* Date : 2022/2/18 9:59:28
* Date : 2023-03-31 11:03:04
* Cfg Tool Ver : 1.0.0
* (c) Heilongjiang TYW electronics co., LTD
*
......@@ -49,8 +49,8 @@ typedef struct
/* GPIO Remap ---------------------------------------------------------------*/
#define Sensor_5V_OUT GPIO_PODR0_POD6
#define P0_8 GPIO_PODR0_POD8
//#define Line_In_MaintainWarning GPIO_PIDR0_PID10
#define Line_In_Energy_Recovery0 GPIO_PIDR0_PID8
#define Line_In_Energy_Recovery GPIO_PIDR0_PID10
#define Line_In_BrakeFluid GPIO_PIDR0_PID11
#define LightingInput_OUT GPIO_PODR0_POD12
#define Line_In_OTA_Switch GPIO_PIDR0_PID13
......@@ -84,7 +84,6 @@ typedef struct
#define PW1_OUT GPIO_PODR1_POD16
/* #define KL_15_AD GPIO_PIDR1_PID17 */
#define Line_In_TurnLeft GPIO_PIDR1_PID19
#define Line_In_Energy_Recovery GPIO_PIDR0_PID10 //yuan
#define CSB1_OUT GPIO_PODR1_POD23
#define SCL1_OUT GPIO_PODR1_POD24
#define SD1_OUT GPIO_PODR1_POD25
......
......@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by GPIO configuration tool.
* Date : 2022/2/18 9:59:28
* Date : 2023-03-31 11:03:04
* Cfg Tool Ver : 1.0.0
* (c) Heilongjiang TYW electronics co., LTD
*
......@@ -18,7 +18,7 @@
const GPIO_Dir_Def_Cfg_t GPIODirDefCfg[GPIO_VALID_PORT_NUM] =
{
/* RunModeDir RunModeDef SleepModeDir SleepModeDef */
{ 0x240311FFUL, 0x26001020UL, 0x240311FFUL, 0x26000040UL,},
{ 0x240310FFUL, 0x26001020UL, 0x240310FFUL, 0x26000040UL,},
{ 0xFFF59B70UL, 0x00000000UL, 0xC0019B63UL, 0x00000360UL,},
{ 0x18FFFFFAUL, 0x0AC7C80AUL, 0x3AFFFFFAUL, 0x00400000UL,},
{ 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,},
......@@ -35,7 +35,7 @@ const GPIO_Pin_Cfg_t GPIOPinCfg[GPIO_VALID_PIN_NUM] =
{ 0x0005, 0x00E0, 0x0020,},
{ 0x0006, 0x00E0, 0x0020,},
{ 0x0007, 0x00E0, 0x0020,},
{ 0x0008, 0x00E0, 0x0020,},
{ 0x0008, 0x10E0, 0x0020,},
{ 0x0009, 0x10E0, 0x0020,},
{ 0x000A, 0x10E0, 0x0020,},
{ 0x000B, 0x10E0, 0x0020,},
......
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