Commit a8ff2bdd authored by hu's avatar hu

调整掉线显示状态

parent 5fda5046
...@@ -778,50 +778,6 @@ void App_Load_Data(void) ...@@ -778,50 +778,6 @@ void App_Load_Data(void)
; ;
} }
//-- gas --//
g_gasMeterInfo.bVirtualVal = 9;
g_gasMeterInfo.Resistor[0] = 0;
g_gasMeterInfo.Resistor[1] = 65; //0.66v
g_gasMeterInfo.Resistor[2] = 83;
g_gasMeterInfo.Resistor[3] = 183;
g_gasMeterInfo.Resistor[4] = 283;
g_gasMeterInfo.Resistor[5] = 327;
g_gasMeterInfo.Resistor[6] = 350;
g_gasMeterInfo.Resistor[7] = 417;
g_gasMeterInfo.Resistor[8] = 450;
g_gasMeterInfo.DashStep[0] = 0;
g_gasMeterInfo.DashStep[1] = 20;
g_gasMeterInfo.DashStep[2] = 40;
g_gasMeterInfo.DashStep[3] = 100;
g_gasMeterInfo.DashStep[4] = 160;
g_gasMeterInfo.DashStep[5] = 180;
g_gasMeterInfo.DashStep[6] = 200;
g_gasMeterInfo.DashStep[7] = 240;
g_gasMeterInfo.DashStep[8] = 260;
//-- adblue --//
g_adblueMeterInfo.bVirtualVal = 8;
g_adblueMeterInfo.Resistor[0] = 0;
g_adblueMeterInfo.Resistor[1] = 50; //5%
g_adblueMeterInfo.Resistor[2] = 104; //10.4%
g_adblueMeterInfo.Resistor[3] = 304;
g_adblueMeterInfo.Resistor[4] = 504;
g_adblueMeterInfo.Resistor[5] = 704;
g_adblueMeterInfo.Resistor[6] = 804;
g_adblueMeterInfo.Resistor[7] = 904;
g_adblueMeterInfo.DashStep[0] = 0;
g_adblueMeterInfo.DashStep[1] = 20;
g_adblueMeterInfo.DashStep[2] = 40;
g_adblueMeterInfo.DashStep[3] = 80;
g_adblueMeterInfo.DashStep[4] = 120;
g_adblueMeterInfo.DashStep[5] = 160;
g_adblueMeterInfo.DashStep[6] = 180;
g_adblueMeterInfo.DashStep[7] = 200;
// //
w_Veh = TPM1Clock; w_Veh = TPM1Clock;
w_Veh1 = g_vehMeterInfo.Resistor[g_vehMeterInfo.bVirtualVal - 1]; w_Veh1 = g_vehMeterInfo.Resistor[g_vehMeterInfo.bVirtualVal - 1];
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
* Author: QTC * Author: QTC
*/ */
#define GLOBALS_GUI_Adblue
#define GLOBALS_GUI_Adblue
#include "defines.h" #include "defines.h"
#include "g_includes.h" #include "g_includes.h"
...@@ -21,14 +20,14 @@ ...@@ -21,14 +20,14 @@
void Gui_Adblue_Disp(void) void Gui_Adblue_Disp(void)
{ {
if(g_adblueMeter.OldPosition != g_adblueMeter.DispPosition) if (g_adblueMeter.OldPosition != g_adblueMeter.DispPosition)
{ {
Adblue_Updeta ; Adblue_Updeta;
} }
if(g_winUpdeta.bits.Adblue_Up == 1) if (g_winUpdeta.bits.Adblue_Up == 1)
{ {
Adblue_UpdetaClr; Adblue_UpdetaClr;
switch(g_adblueMeter.DispPosition) switch (g_adblueMeter.DispPosition)
{ {
case 10: case 10:
Api_DrawImgIcon(211, 78, Adblue_zouge); Api_DrawImgIcon(211, 78, Adblue_zouge);
...@@ -50,10 +49,9 @@ void Gui_Adblue_Disp(void) ...@@ -50,10 +49,9 @@ void Gui_Adblue_Disp(void)
Api_DrawImgIcon(75, 78, Adblue_zouge); Api_DrawImgIcon(75, 78, Adblue_zouge);
case 1: case 1:
Api_DrawImgIcon(58, 78, Adblue_zouge); Api_DrawImgIcon(58, 78, Adblue_zouge);
default: default:;
;
} }
switch(g_adblueMeter.DispPosition + 1) switch (g_adblueMeter.DispPosition + 1)
{ {
case 1: case 1:
Api_DrawImgIcon(58, 78, ClrAdblue_zouge); Api_DrawImgIcon(58, 78, ClrAdblue_zouge);
...@@ -75,12 +73,10 @@ void Gui_Adblue_Disp(void) ...@@ -75,12 +73,10 @@ void Gui_Adblue_Disp(void)
Api_DrawImgIcon(194, 78, ClrAdblue_zouge); Api_DrawImgIcon(194, 78, ClrAdblue_zouge);
case 10: case 10:
Api_DrawImgIcon(211, 78, ClrAdblue_zouge); Api_DrawImgIcon(211, 78, ClrAdblue_zouge);
default: default:;
;
} }
} }
g_adblueMeter.OldPosition = g_adblueMeter.DispPosition; g_adblueMeter.OldPosition = g_adblueMeter.DispPosition;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -94,7 +90,7 @@ void Gui_Adblue_Disp(void) ...@@ -94,7 +90,7 @@ void Gui_Adblue_Disp(void)
void Gui_Adblue_Disp_Manage(void) void Gui_Adblue_Disp_Manage(void)
{ {
//-- Set Time --// //-- Set Time --//
if(g_adblueMeter.CurPosition >= g_adblueMeter.DestPosition) if (g_adblueMeter.CurPosition >= g_adblueMeter.DestPosition)
{ {
g_adblueMeter.DelayTime = T_1s; g_adblueMeter.DelayTime = T_1s;
} }
...@@ -104,18 +100,22 @@ void Gui_Adblue_Disp_Manage(void) ...@@ -104,18 +100,22 @@ void Gui_Adblue_Disp_Manage(void)
} }
//-- Run --// //-- Run --//
if((g_adblueMeter.Time > g_adblueMeter.DelayTime) || (g_sysFlag.Bits.AdbuleMeterInit)) if ((g_adblueMeter.Time > g_adblueMeter.DelayTime) || (g_sysFlag.Bits.AdbuleMeterInit))
{ {
g_adblueMeter.Time = null; g_adblueMeter.Time = null;
if(g_adblueMeter.CurPosition < g_adblueMeter.DestPosition) if (g_adblueMeter.CurPosition < g_adblueMeter.DestPosition)
{ {
g_adblueMeter.CurPosition ++; g_adblueMeter.CurPosition++;
} }
if(g_adblueMeter.CurPosition > g_adblueMeter.DestPosition) if (g_adblueMeter.CurPosition > g_adblueMeter.DestPosition)
{ {
g_adblueMeter.CurPosition --; g_adblueMeter.CurPosition--;
} }
//显示值
g_adblueMeter.DispPosition = g_adblueMeter.CurPosition;
/*
//-- Disp --// //-- Disp --//
if(g_adblueMeter.CurPosition <= 15) if(g_adblueMeter.CurPosition <= 15)
{ {
...@@ -165,50 +165,51 @@ void Gui_Adblue_Disp_Manage(void) ...@@ -165,50 +165,51 @@ void Gui_Adblue_Disp_Manage(void)
{ {
; ;
} }
*/
} }
//报警灯 //10.19 天蓝液报警灯
if(g_sysFlag.Bits.AdbuleMeterInit == Disable) if (g_sysFlag.Bits.AdbuleMeterInit == Disable)
{ {
//超时维持 //超时维持
if(ConfigItem.AdblueConfig == 0) //13% if (ConfigItem.AdblueConfig == 0) //13%
{ {
if(g_canClock.signal.Exist65110_00) if (g_canClock.signal.Exist65110_00)
{ {
if(g_adblueMeter.CurPosition <= 43) // 2021-04-12 (10%)36改(12%)43 if (g_adblueMeter.CurPosition <= 43) // 2021-04-12 (10%)36改(12%)43
{ {
Enable_signal(g_sysFlag.Bits.AdbuleLedEn); Enable_signal(g_sysFlag.Bits.AdbuleLedEn);
} }
else if(g_adblueMeter.CurPosition >= 47) // 2021-04-12 (12%)42改(14%)47 else if (g_adblueMeter.CurPosition >= 47) // 2021-04-12 (12%)42改(14%)47
{ {
Disable_signal(g_sysFlag.Bits.AdbuleLedEn); Disable_signal(g_sysFlag.Bits.AdbuleLedEn);
} }
} }
} }
else if(ConfigItem.AdblueConfig == 1) //15% else if (ConfigItem.AdblueConfig == 1) //15%
{ {
if(g_canClock.signal.Exist65110_A3) if (g_canClock.signal.Exist65110_A3)
{ {
if(g_adblueMeter.CurPosition <= 43) // 2021-04-12 (10%)36改(12%)43 if (g_adblueMeter.CurPosition <= 43) // 2021-04-12 (10%)36改(12%)43
{ {
Enable_signal(g_sysFlag.Bits.AdbuleLedEn); Enable_signal(g_sysFlag.Bits.AdbuleLedEn);
} }
else if(g_adblueMeter.CurPosition >= 47) // 2021-04-12 (12%)42改(14%)47 else if (g_adblueMeter.CurPosition >= 47) // 2021-04-12 (12%)42改(14%)47
{ {
Disable_signal(g_sysFlag.Bits.AdbuleLedEn); Disable_signal(g_sysFlag.Bits.AdbuleLedEn);
} }
} }
} }
else else
{ {
; ;
} }
} }
//超过5s,初始化完成 //超过5s,初始化完成
if(g_Init.InitAdblueTime >= T_5_0s) if (g_Init.InitAdblueTime >= T_5_0s)
{ {
if(g_adblueMeter.CurPosition >= g_adblueMeter.DestPosition ) if (g_adblueMeter.CurPosition >= g_adblueMeter.DestPosition)
g_sysFlag.Bits.AdbuleMeterInit = Disable; g_sysFlag.Bits.AdbuleMeterInit = Disable;
} }
} }
This diff is collapsed.
...@@ -890,18 +890,8 @@ void Gui_KL15LedDisplay(void) ...@@ -890,18 +890,8 @@ void Gui_KL15LedDisplay(void)
bDSTable[PicBrakePiece] = 0; bDSTable[PicBrakePiece] = 0;
} }
} }
//10.19 天蓝液 AdBlue 图片,屏幕指示灯
if ((g_sysFlag.Bits.AdbuleLedEn) && ((ConfigItem.AdblueConfig == 0) || (ConfigItem.AdblueConfig == 1)))
{
bDSTable[PicAdblueLow] |= DS0_MASK;
}
else
{
bDSTable[PicAdblueLow] = 0;
}
//BD8379_D11 10.20 门开 门开在30电上 //BD8379_D11 10.20 门开 门开在30电上
//10.19 天蓝液 在显示部分实现的
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* Function Name : Gui_KL30LedDisplay * Function Name : Gui_KL30LedDisplay
......
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