Commit 6107fe6d authored by hu's avatar hu

调整自检,增加电池计走动,走格子时间不对

parent ec4e14fe
No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 316332
project .rodata 411111
project .text 316668
project .rodata 411127
project .secinfo 120
project .syscall 6
project .romdata 9029
......
......@@ -71,14 +71,14 @@ typedef enum
void Data_Gear_KL30_Init(void);
void Data_Gear_KL15_Init(void);
void Data_Service_Gear_Processing(void);
uint8_t Get_Gear_Mode_Type(void);
uint8_t Get_Gear_Mode_Number(void);
uint8_t Get_Gear_Mode_UPDOWN_Number(void);
uint8_t Get_Gear_Mode_Up_Down(void);
uint8_t Get_Gear_Mode_Display_Flash(void);
uint8_t Get_Gear_Mode_M_A_Display(void);
uint8_t Get_Gear_Mode_P_E_Display(void);
uint8_t Get_Gear_Mode_L_C_Display(void);
//void Data_Service_Gear_Processing(void);
//uint8_t Get_Gear_Mode_Type(void);
//uint8_t Get_Gear_Mode_Number(void);
//uint8_t Get_Gear_Mode_UPDOWN_Number(void);
//uint8_t Get_Gear_Mode_Up_Down(void);
//uint8_t Get_Gear_Mode_Display_Flash(void);
//uint8_t Get_Gear_Mode_M_A_Display(void);
//uint8_t Get_Gear_Mode_P_E_Display(void);
//uint8_t Get_Gear_Mode_L_C_Display(void);
#endif
\ No newline at end of file
......@@ -11,6 +11,7 @@
* version: author, date, desc\n
*/
#include "Gauges.h"
#include "GaugesInterface.h"
#define GAUGES_TOTAL_NUM 9u
#define GAUGES_INIT_TIME_MAX 3000u
uint16_t GaugesCurrentPos[GAUGES_TOTAL_NUM] ;
......@@ -73,8 +74,6 @@ uint8_t QuerySector(_GaugesInfoInit *GParam, uint8_t DirecSignPara, uint8_t Sub
;
}
}
}
else
{
......@@ -554,6 +553,66 @@ void GaugeMoveing(uint8_t GaugesNum)
GaugesDisPos[GaugesNum] = DestPostion[GaugesNum];
}
}
void SeftTest_GaugeMoveing(uint8_t GaugesNum)
{
uint16_t MoveTypePara;
MoveTypePara = 100u;
if ((GaugesModuleType [GaugesNum] == FreeMoveType) || (GaugesModuleType [GaugesNum] == LEDTempType))
{
MoveTypePara = 10u;
}
else
{
MoveTypePara = 100u;
}
if (GaugesDisDelay[GaugesNum] >= SeftTest_Gauges_Times[GaugesNum])
{
if (GaugesInitTimes > GaugesStarMoveTimeMax[GaugesNum])
{
if ((GaugesCurrentPos[GaugesNum] + MoveTypePara) < DestPostion[GaugesNum])
{
GaugesCurrentPos[GaugesNum] += MoveTypePara;
}
else if ((GaugesCurrentPos[GaugesNum] - MoveTypePara) > DestPostion[GaugesNum])
{
GaugesCurrentPos[GaugesNum] -= MoveTypePara;
}
else
{
GaugesCurrentPos[GaugesNum] = DestPostion[GaugesNum];
}
}
else
{
;
}
GaugesDisDelay[GaugesNum] = 0u;
}
else
{
;
}
if (GaugesModuleType [GaugesNum] >= LEDOtherType)
{
if (GaugesCurrentPos[GaugesNum] % MoveTypePara == 0u)
{
GaugesDisPos[GaugesNum] = GaugesCurrentPos[GaugesNum] / MoveTypePara;
}
else
{
;
}
}
else
{
GaugesDisPos[GaugesNum] = GaugesCurrentPos[GaugesNum] ;
}
}
/**@brief Gauge Schedule function
* @author TYW
* @param[in] GaugeNum Gauge Postion
......@@ -687,6 +746,7 @@ void GaugesK15Init_OFF(void)
void Gauges_Time_Xms_Count(uint8_t Xms)
{
uint8_t i = 0u;
uint8_t tmp = 0u ;
for (i = 0u; i < GAUGES_TOTAL_NUM; i++)
{
if (GaugesCurrentPos[i] != DestPostion[i])
......@@ -704,7 +764,16 @@ void Gauges_Time_Xms_Count(uint8_t Xms)
{
GaugesDisDelay[i] = 0u;
}
GaugeMoveing(i) ;
tmp = (GaugesInitTimes < (GaugesStarMoveTimeMax[i] + Gauages_Init_Time_Max[ModeGaugesTestFlag[i]]));
if (tmp)
{
SeftTest_GaugeMoveing(i);
}
else
{
GaugeMoveing(i) ;
}
}
if (GaugesPowerState == 1u)
{
......
......@@ -79,4 +79,6 @@ extern uint16_t GetVehDisVal(uint16_t VehCurPos, _GaugesInfoInit *GParam);
extern void SetFreeMoveTimes(uint16_t GaugesMoveTimes);
/*得到上下行方向 返回值:1 2*/
extern uint8_t GetGaugesDirec(uint8_t GaugesNum) ;
extern void SeftTest_GaugeMoveing(uint8_t GaugesNum) ;
#endif
\ No newline at end of file
......@@ -5,18 +5,20 @@
*/
#include "Common_Interface.h"
#define Self_time 1250u
static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
{
/*车速*/
{
{0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 5, 9, 13, 17, 21, 25, 30, 35, 40, 45, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
{0, 200, 400, 600, 800, 1000, 1200, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 200, 400, 600, 800, 1000, 1200, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
},
/*转速*/
{ {0u, 1000, 1500, 2000, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0u, 1000, 1500, 2000, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0u, 6, 11, 16, 21, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
{1u, 6, 11, 16, 21, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
},
/*水温*/
{ { 0, 50, 55, 61, 66, 72, 77, 102, 104, 106, 108, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
......@@ -39,9 +41,9 @@ static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0}
},
/*电池电压*/
{ {0, 17000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000, 30500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 17000, 18500, 19500, 20500, 21500, 22500, 23500, 24500, 25500, 26500, 27500, 28500, 29500, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
{ {0, 17000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 18500, 19500, 20500, 21500, 22500, 23500, 24500, 25500, 26500, 27500, 28500, 29500, 30500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
},
};
......@@ -49,14 +51,14 @@ static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
/*指示类型*/ /*表头1 表头2 表头3 表头4*/ /*表头5*/ /*表头6*/ /*表头7*/
static const uint8_t GaugesIndicatType[GaugesTotal] = {LEDOtherType, LEDOtherType, LEDTempType, LEDGasType, LEDGasType, LEDGasType, LEDOtherType}; /*初始化表头显示类型,例如水温,气压*/
/*每个表头包含的参数个数*/ /*表头1 表头2 表头3 表头4*/
static const uint8_t GaugesParaNum[GaugesTotal] = {12, 6, 13, 19, 19, 19, 15};
static const uint8_t GaugesParaNum[GaugesTotal] = {8, 6, 13, 19, 19, 19, 14};
/*每个表头IGON后开始走动时间*/ /*表头1 表头2 表头3 表头4 表头5 表头6*/
static const uint16_t GaugesStarMoveTime[GaugesTotal] = {3000, 3000, 3000, 3000, 3000, 0, 0,}; /*0是上电就开始走动,其他参数是ms*/
static const uint16_t GaugesStarMoveTime[GaugesTotal] = {0, 0, 0, 0, 0, 0, 0,}; /*0是上电就开始走动,其他参数是ms*/
/*每个表头IGON后是否自检*/ /*表头1 表头2 表头3 表头4 表头5 表头6*/
static const uint16_t GaugesTest[GaugesTotal] = {1, 1, 1, 1, 1, 0, 0,}; /*1是自检,0不自检*/
/*每个表头自检走动每格时间*/
const uint16_t SeftTest_Gauges_Times[GaugesTotal] = {1500 / (30 + 1), 1500 / (27 + 1), 1500 / (12 + 1), 1500 / (18 + 1), 1500 / (18 + 1), 0, 0};
const uint16_t SeftTest_Gauges_Times[GaugesTotal] = {(Self_time / (30 + 1)), (Self_time / (27 + 1)), (Self_time / (12 + 1)), (Self_time / (18 + 1)), (Self_time / (18 + 1)), 0, 0};
uint16_t RealDataIn[GaugesTotal];
_GaugesInfoInit GaugesInfo_Init_Table[GaugesTotal];
/**@brief User Gauge K30 Init function
......
......@@ -24,6 +24,7 @@
#include "Data_Fuel_User.h"
#include "CAN_FUNC.h"
#include "key.h"
#include "Data_Voltmeter.h"
#define TRAPA 0u
#define TRAPB 1u
......@@ -1558,6 +1559,7 @@ void GUI_Drive_Info_Avg_Fuel_Display(uint16_t Fuel)
void GUI_Battery_Display_Display(uint8_t Mode)
{
uint8_t current_value = 0u;
uint8_t current_Flag = 0u;
if (Mode == GUI_DISP_MODE_NORMAL)
{
......@@ -1566,35 +1568,136 @@ void GUI_Battery_Display_Display(uint8_t Mode)
GUI_General_Display(MultiPurpose_Sprite, CN_dianyaji_L, GUI_BLENDMODE_SRC_OVER); /*L*/
GUI_General_Display(MultiPurpose_Sprite, CN_dianyaji_H, GUI_BLENDMODE_SRC_OVER); /*H*/
current_value = HYQ_TEST;
current_value = Gui_Get_Voltmeter_DisplayMode();
if (current_value > 4u)
{
current_Flag = 1u; /*白*/
}
else
{
current_Flag = 0u;/*红*/
}
switch (current_value)
{
case 0x0Du:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Cu), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Cu), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x0Cu), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x0Cu:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Bu), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Bu), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x0Bu), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x0Bu:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Au), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x0Au), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x0Au), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x0Au:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x09u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x09u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x09u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x09u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x08u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x08u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x08u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x08u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x07u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x07u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x07u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x07u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x06u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x06u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x06u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x06u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x05u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x05u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x05u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x05u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x04u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x04u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x04u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x04u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x03u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x03u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x03u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x03u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x02u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x02u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x02u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x02u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x01u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x01u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x01u), 276u, GUI_BLENDMODE_CUSTOM);
}
case 0x01u:
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x00u), 276u, GUI_BLENDMODE_CUSTOM);
if (current_Flag == 1u)
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_white, (536 + 17u * 0x00u), 276u, GUI_BLENDMODE_CUSTOM);
}
else
{
GUI_Translate_Display(MultiPurpose_Sprite, CN_dianyaji_zouge_red, (536 + 17u * 0x00u), 276u, GUI_BLENDMODE_CUSTOM);
}
break;
default:
GUI_General_Display(MultiPurpose_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
......@@ -1635,7 +1738,7 @@ void GUI_DPD_Display_Display(uint8_t Mode)
GUI_General_Display(MultiPurpose_Sprite, CN_DPD_zaishengjindu, GUI_BLENDMODE_SRC_OVER); /*DPD再生黄*/
}
if ((value >= 0u) && (value <= 100u))
if (value <= 100u)
{
GUI_General_Display(MultiPurpose_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
......
......@@ -111,7 +111,7 @@ typedef enum
/*特殊界面*/
_MN_DSP_ENTER_MENU, /* 75 确认*/
_MN_DSP_RETURN_MENU, /* 76 返回*/
};
}_MenuCode;
typedef uint8_t _MENU_IDX;
typedef struct
......
......@@ -13,7 +13,7 @@
#define UE_Enable 1U
#define DisplayAnimationTime 3000u
#define DisplayAnimationTime 3500u
#define DisplayMenuTime 5000u / 10u
#define MAX_DriveInfoPage 6u
#define FUNC_ENABLE 1u
......
......@@ -182,7 +182,6 @@ void Sys_Run_Mode_50ms_Tasks(void)
{
Data_Time_Calibration();
Data_Service_Gear_Processing();
Speed_PPK_Processing();
Sound_Scheduling_Service();
// BGTask();
......@@ -202,7 +201,6 @@ void Sys_Run_Mode_100ms_Tasks(void)
Data_Trip_Processing();
// Data_Avg_Speed_Processing();
Data_TPMS_Value_Processing();
Data_Service_Gear_Processing();
Data_Ambient_Temperature_Processing();
// Display_Schedule_Service();/*显示函数入口*/
......
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