Commit 11760a7c authored by 时昊's avatar 时昊

变更

parent c6a0b88a
...@@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile ...@@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile
@echo on @echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off @echo off
goto end goto end
...@@ -34,7 +34,7 @@ goto end ...@@ -34,7 +34,7 @@ goto end
@echo on @echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off @echo off
:end :end
\ No newline at end of file
...@@ -17,6 +17,14 @@ typedef struct ...@@ -17,6 +17,14 @@ typedef struct
uint8_t segNum; uint8_t segNum;
}BatterySegMap_st_t; }BatterySegMap_st_t;
typedef struct
{
uint32_t Value;
uint8_t Symbol;
uint8_t Valid;
}BattCurr_st_t;
#define POSITIVE_POWER_SEG_MAP_MAX (sizeof(PositivePowerSegMap)/sizeof(PowerSegMap_st_t)) #define POSITIVE_POWER_SEG_MAP_MAX (sizeof(PositivePowerSegMap)/sizeof(PowerSegMap_st_t))
#define NEGATIVE_POWER_SEG_MAP_MAX (sizeof(NegativePowerSegMap)/sizeof(PowerSegMap_st_t)) #define NEGATIVE_POWER_SEG_MAP_MAX (sizeof(NegativePowerSegMap)/sizeof(PowerSegMap_st_t))
#define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t)) #define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t))
......
...@@ -141,7 +141,7 @@ _Fun_Res SEG_SET_LED_STS(uint8_t LED_NUM , uint8_t m_Flag) ...@@ -141,7 +141,7 @@ _Fun_Res SEG_SET_LED_STS(uint8_t LED_NUM , uint8_t m_Flag)
_Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag,uint8_t m_Gear) _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag,uint8_t m_Gear)
{ {
_Fun_Res m_Res ; _Fun_Res m_Res ;
if((m_Gear_Flag>=2u)||(m_Gear>3u)) if((m_Gear_Flag>=2u)||(m_Gear>4u))
{ {
m_Res = EX_ERR; m_Res = EX_ERR;
} }
...@@ -221,6 +221,30 @@ _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag,uint8_t m_Gear) ...@@ -221,6 +221,30 @@ _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag,uint8_t m_Gear)
IC2_SEG042 = IC_SEG_OFF; IC2_SEG042 = IC_SEG_OFF;
IC2_SEG043 = IC_SEG_ON; IC2_SEG043 = IC_SEG_ON;
IC2_SEG044 = IC_SEG_ON; IC2_SEG044 = IC_SEG_ON;
}
else if(m_Gear==Gear_S)
{
IC2_SEG034 = IC_SEG_OFF;
IC2_SEG033 = IC_SEG_ON;
IC2_SEG031 = IC_SEG_ON;
IC2_SEG050 = IC_SEG_ON;
IC2_SEG036 = IC_SEG_ON;
IC2_SEG035 = IC_SEG_OFF;
IC2_SEG049 = IC_SEG_OFF;
IC2_SEG037 = IC_SEG_ON;
IC2_SEG041 = IC_SEG_ON;
IC2_SEG032 = IC_SEG_ON;
IC2_SEG030 = IC_SEG_ON;
IC2_SEG048 = IC_SEG_ON;
IC2_SEG038 = IC_SEG_OFF;
IC2_SEG046 = IC_SEG_OFF;
IC2_SEG047 = IC_SEG_ON;
IC2_SEG045 = IC_SEG_ON;
IC2_SEG039 = IC_SEG_OFF;
IC2_SEG040 = IC_SEG_ON;
IC2_SEG042 = IC_SEG_ON;
IC2_SEG043 = IC_SEG_ON;
IC2_SEG044 = IC_SEG_ON;
} }
else else
{ {
...@@ -2839,6 +2863,30 @@ _Fun_Res SEG_SET_GEAR1(uint8_t m_Gear_Flag,uint8_t m_Gear) ...@@ -2839,6 +2863,30 @@ _Fun_Res SEG_SET_GEAR1(uint8_t m_Gear_Flag,uint8_t m_Gear)
IC2_SEG042 = IC_SEG_OFF; IC2_SEG042 = IC_SEG_OFF;
IC2_SEG043 = IC_SEG_ON; IC2_SEG043 = IC_SEG_ON;
IC2_SEG044 = IC_SEG_ON; IC2_SEG044 = IC_SEG_ON;
}
else if(m_Gear==Gear_S)
{
IC2_SEG034 = IC_SEG_OFF;
IC2_SEG033 = IC_SEG_ON;
IC2_SEG031 = IC_SEG_ON;
IC2_SEG050 = IC_SEG_ON;
IC2_SEG036 = IC_SEG_ON;
IC2_SEG035 = IC_SEG_OFF;
IC2_SEG049 = IC_SEG_OFF;
IC2_SEG037 = IC_SEG_ON;
IC2_SEG041 = IC_SEG_ON;
IC2_SEG032 = IC_SEG_ON;
IC2_SEG030 = IC_SEG_ON;
IC2_SEG048 = IC_SEG_ON;
IC2_SEG038 = IC_SEG_OFF;
IC2_SEG046 = IC_SEG_OFF;
IC2_SEG047 = IC_SEG_ON;
IC2_SEG045 = IC_SEG_ON;
IC2_SEG039 = IC_SEG_OFF;
IC2_SEG040 = IC_SEG_ON;
IC2_SEG042 = IC_SEG_ON;
IC2_SEG043 = IC_SEG_ON;
IC2_SEG044 = IC_SEG_ON;
} }
else else
{ {
......
...@@ -49,6 +49,7 @@ enum ...@@ -49,6 +49,7 @@ enum
Gear_R, //R Gear_R, //R
Gear_N, //N Gear_N, //N
Gear_D, //D Gear_D, //D
Gear_S, //S
}; };
/**@brief �߿�����ʾ����*/ /**@brief �߿�����ʾ����*/
......
...@@ -24,6 +24,7 @@ const _LINE_IN_TriggerLevel_ Line_In_DEFAULT_Level[LINE_MAX] = ...@@ -24,6 +24,7 @@ const _LINE_IN_TriggerLevel_ Line_In_DEFAULT_Level[LINE_MAX] =
LEVEL_LOW, LEVEL_LOW,
LEVEL_HIGH, LEVEL_HIGH,
LEVEL_LOW,//sh LEVEL_LOW,//sh
LEVEL_HIGH,
}; };
/*触发电平*/ /*触发电平*/
const _LINE_IN_TriggerLevel_ Line_In_Trigger_Level[LINE_MAX] = const _LINE_IN_TriggerLevel_ Line_In_Trigger_Level[LINE_MAX] =
...@@ -44,6 +45,7 @@ const _LINE_IN_TriggerLevel_ Line_In_Trigger_Level[LINE_MAX] = ...@@ -44,6 +45,7 @@ const _LINE_IN_TriggerLevel_ Line_In_Trigger_Level[LINE_MAX] =
LEVEL_HIGH, LEVEL_HIGH,
LEVEL_LOW, LEVEL_LOW,
LEVEL_HIGH,//sh LEVEL_HIGH,//sh
LEVEL_LOW,
}; };
/*清除电平*/ /*清除电平*/
const _LINE_IN_TriggerLevel_ Line_In_Remove_Level[LINE_MAX] = const _LINE_IN_TriggerLevel_ Line_In_Remove_Level[LINE_MAX] =
...@@ -64,6 +66,7 @@ const _LINE_IN_TriggerLevel_ Line_In_Remove_Level[LINE_MAX] = ...@@ -64,6 +66,7 @@ const _LINE_IN_TriggerLevel_ Line_In_Remove_Level[LINE_MAX] =
LEVEL_LOW, LEVEL_LOW,
LEVEL_HIGH, LEVEL_HIGH,
LEVEL_LOW,//sh LEVEL_LOW,//sh
LEVEL_HIGH,
}; };
/*工作状态*/ /*工作状态*/
const _LINE_IN_WorkSt_ Line_In_Work_Status[LINE_MAX] = const _LINE_IN_WorkSt_ Line_In_Work_Status[LINE_MAX] =
...@@ -84,6 +87,7 @@ const _LINE_IN_WorkSt_ Line_In_Work_Status[LINE_MAX] = ...@@ -84,6 +87,7 @@ const _LINE_IN_WorkSt_ Line_In_Work_Status[LINE_MAX] =
LINE_IN_IG_OFFON, LINE_IN_IG_OFFON,
LINE_IN_IG_OFFON, LINE_IN_IG_OFFON,
LINE_IN_IG_ON,//sh LINE_IN_IG_ON,//sh
LINE_IN_IG_ON,
}; };
/*触发时间*/ /*触发时间*/
const uint32_t Line_In_Trigger_Timer[LINE_MAX] = const uint32_t Line_In_Trigger_Timer[LINE_MAX] =
...@@ -104,6 +108,7 @@ const uint32_t Line_In_Trigger_Timer[LINE_MAX] = ...@@ -104,6 +108,7 @@ const uint32_t Line_In_Trigger_Timer[LINE_MAX] =
100ul, 100ul,
100ul, 100ul,
100ul,//sh 100ul,//sh
100ul,
}; };
/*清除电平*/ /*清除电平*/
const uint32_t Line_In_Remove_Timer[LINE_MAX] = const uint32_t Line_In_Remove_Timer[LINE_MAX] =
...@@ -124,6 +129,7 @@ const uint32_t Line_In_Remove_Timer[LINE_MAX] = ...@@ -124,6 +129,7 @@ const uint32_t Line_In_Remove_Timer[LINE_MAX] =
50ul, 50ul,
50ul, 50ul,
80ul,//sh 80ul,//sh
80ul,
}; };
/*使能*/ /*使能*/
...@@ -197,6 +203,7 @@ void Line_In_Debounce_Service(void) ...@@ -197,6 +203,7 @@ void Line_In_Debounce_Service(void)
Line_In_Debounce( LINE_IN_SOC_CC, Get_Line_In_SOC_CC()); 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_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 //前雾灯
Line_In_Debounce( LINE_IN_ENERGY_RECOVERY0, Get_Line_In_Energy_Recovery0());
} }
} }
/*获取当前硬线状态*/ /*获取当前硬线状态*/
......
...@@ -38,6 +38,7 @@ typedef enum ...@@ -38,6 +38,7 @@ typedef enum
LINE_IN_SOC_CC, LINE_IN_SOC_CC,
LINE_IN_DOOROPEN, LINE_IN_DOOROPEN,
LINE_IN_ENERGY_RECOVERY,//sh LINE_IN_ENERGY_RECOVERY,//sh
LINE_IN_ENERGY_RECOVERY0,
LINE_MAX, LINE_MAX,
} _LINE_IN_NAME_; } _LINE_IN_NAME_;
......
...@@ -222,15 +222,15 @@ void EnergyRecovery0_Key_Detect(void) ...@@ -222,15 +222,15 @@ void EnergyRecovery0_Key_Detect(void)
if ( SYS_OPR_STAT_IGN_ON ) if ( SYS_OPR_STAT_IGN_ON )
{ {
Key_SW_EnergyRecovery0 = Get_Line_In_Energy_Recovery0(); Key_SW_EnergyRecovery0 = Get_LINE_IN_Sts(LINE_IN_ENERGY_RECOVERY0);
if ( Key_SW_EnergyRecovery0 == 0u ) if ( Key_SW_EnergyRecovery0 == 1u )
{ {
if ( Key_SW_EnergyRecovery0_Timer < 255u ) if ( Key_SW_EnergyRecovery0_Timer < 255u )
{ {
Key_SW_EnergyRecovery0_Timer++; Key_SW_EnergyRecovery0_Timer++;
} }
if ( Key_SW_EnergyRecovery0_Timer >= 200u ) /*长按判断*/ if ( Key_SW_EnergyRecovery0_Timer >= 150u ) /*长按判断*/
{ {
Key_EnergyRecovery0 = MMI_KEY_HOLD; /*长按TRIP*/ Key_EnergyRecovery0 = MMI_KEY_HOLD; /*长按TRIP*/
} }
...@@ -239,9 +239,9 @@ void EnergyRecovery0_Key_Detect(void) ...@@ -239,9 +239,9 @@ void EnergyRecovery0_Key_Detect(void)
Key_EnergyRecovery0 = MMI_KEY_IDLE; /*按键抬起*/ Key_EnergyRecovery0 = MMI_KEY_IDLE; /*按键抬起*/
} }
} }
else if ( Key_SW_EnergyRecovery0 == 1u ) else if ( Key_SW_EnergyRecovery0 == 0u )
{ {
if ( (Key_SW_EnergyRecovery0_Timer > 50u) && (Key_SW_EnergyRecovery0_Timer < 200u) ) if ( (Key_SW_EnergyRecovery0_Timer > 20u) && (Key_SW_EnergyRecovery0_Timer < 150u) )
{ {
Key_EnergyRecovery0 = MMI_KEY_PRESS; /*短按TRIP*/ Key_EnergyRecovery0 = MMI_KEY_PRESS; /*短按TRIP*/
} }
......
...@@ -2415,7 +2415,7 @@ void SEG_DISPLAY(void) ...@@ -2415,7 +2415,7 @@ void SEG_DISPLAY(void)
{ {
Frame = 0; Frame = 0;
} }
if(GEAR > 3) if(GEAR > 4)
{ {
GEAR = 0; GEAR = 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