Commit 31cbd497 authored by hu's avatar hu

调整AD 调整按键采集范围,调整电池显示,调整WET显示功能

parent 8e698101
No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 317660
project .rodata 411071
project .text 317676
project .rodata 411103
project .secinfo 120
project .syscall 6
project .romdata 9029
project .romdata 9021
project .ROM.ramfunc 208
project .ramfunc 208
......@@ -272,11 +272,11 @@ void Data_WET_Processing_Service(void)
if ((K_Line_Set.K_Line_LID42 == 0x00) || (K_Line_Set.K_Line_LID42 == 0x02))
{
Gas_Value = 0u;
Gas_Value = RTE_Read_WET_AIR_Voltage();
}
else if ((K_Line_Set.K_Line_LID42 == 0x01) || (K_Line_Set.K_Line_LID42 == 0x03))
{
Gas_Value = 0u;
Gas_Value = RTE_Read_WET_AIR_Voltage();
}
if ((Common_Get_IG_Sts_Valid() == 1u) && (Common_Get_IG_Sts() == COMMON_POWER_ON))
......
......@@ -137,7 +137,6 @@ static void Data_Voltmeter_2_Gui(void)
if (VoltmeterVariable.Valid)
{
VoltmeterVariable.AvrVoltage /= 10u;
SetGaugesPara(VoltGauges, VoltmeterVariable.AvrVoltage);
u8GuiMode = GetGaugesCurrentPos(VoltGauges);
}
......
......@@ -435,7 +435,14 @@ void GaugeMoveing(uint8_t GaugesNum)
}
}
MoveTypePara = 10u;
if (GaugesNum == VoltGauges)
{
MoveTypePara = 100u;
}
else
{
MoveTypePara = 10u;
}
}
else
{
......
......@@ -41,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, 1700, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1850, 1950, 2050, 2150, 2250, 2350, 2450, 2550, 2650, 2750, 2850, 2950, 3050, 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}
{ {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}
},
};
......
......@@ -638,7 +638,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Up(void)
}
else
{
if ((Key_R >= (1200 - 300)) && (Key_R <= (1200 + 300)))
if ((Key_R >= (1200 - 400)) && (Key_R <= (1200 + 400)))
{
enKeyRealStatus = KEY_LINE_PRESS;
}
......@@ -665,7 +665,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Down(void)
}
else
{
if ((Key_R >= (2900 - 300)) && (Key_R <= (2900 + 300)))
if ((Key_R >= (2700 - 400)) && (Key_R <= (2700 + 400)))
{
enKeyRealStatus = KEY_LINE_PRESS;
}
......@@ -692,7 +692,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Enter(void)
}
else
{
if ((Key_R >= (5300 - 300)) && (Key_R <= (5300 + 300)))
if ((Key_R >= (4700 - 400)) && (Key_R <= (4700 + 400)))
{
enKeyRealStatus = KEY_LINE_PRESS;
}
......@@ -718,7 +718,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Return(void)
}
else
{
if ((Key_R >= (9150 - 300)) && (Key_R <= (9150 + 300)))
if ((Key_R >= (8000 - 400)) && (Key_R <= (8000 + 400)))
{
enKeyRealStatus = KEY_LINE_PRESS;
}
......
......@@ -25,6 +25,7 @@
#include "CAN_FUNC.h"
#include "key.h"
#include "Data_Voltmeter.h"
#include "Data_AirPressure.h"
#define TRAPA 0u
#define TRAPB 1u
......@@ -602,7 +603,8 @@ void GUI_WetGas_Dispaly(uint8_t Mode)
if (Mode == GUI_DISP_MODE_NORMAL)
{
current_value = HYQ_TEST;
current_value = GetGaugesCurrentPos(WETGasGauges);
//Common_Get_WET_Valid(); /*有效性判断用*/
if (current_value <= 17u)
{
......
......@@ -92,6 +92,20 @@ uint32_t RTE_Read_SECONDARY_AIR_Voltage(void)
Result = ADC_Read_Signal(ADC_CH_SECONDARY_AIR_VOLTAGE);
return Result;
}
/*-------------------------------------------------------------------------
* Function Name : RTE_Read_WET_AIR_Voltage
* Description : 读WET
* Input : None
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
uint32_t RTE_Read_WET_AIR_Voltage(void)
{
uint32_t Result = 0x00ul;
Result = ADC_Read_Signal(ADC_CH_WETAIR_VOLTAGE);
return Result;
}
/*-------------------------------------------------------------------------
* Function Name : RTE_Read_FUEL_REF_Voltage
* Description : 读燃油基准电压
......@@ -186,7 +200,7 @@ uint8_t RTE_Read_KL30_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_PRIMARY_AIR_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_PRIMARY_AIR_VOLTAGE);
return Result;
}
......@@ -200,7 +214,7 @@ uint8_t RTE_Read_PRIMARY_AIR_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_SECONDARY_AIR_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_SECONDARY_AIR_VOLTAGE);
return Result;
}
......@@ -214,7 +228,7 @@ uint8_t RTE_Read_SECONDARY_AIR_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_FUEL_REF_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_FUEL_REF_VOLTAGE);
return Result;
}
......@@ -228,7 +242,7 @@ uint8_t RTE_Read_FUEL_REF_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_FUEL_R_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_FUEL_R);
return Result;
}
......@@ -242,7 +256,7 @@ uint8_t RTE_Read_FUEL_R_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_KEY_R_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_KEY);
return Result;
}
......@@ -256,7 +270,22 @@ uint8_t RTE_Read_KEY_R_Valid(void)
--------------------------------------------------------------------------*/
uint8_t RTE_Read_NTC_R_Valid(void)
{
uint8_t Result = 0x00u;
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_NTC_R);
return Result;
}
/*-------------------------------------------------------------------------
* Function Name : RTE_Read_WET_AIR_Value
* Description :
* Input : None
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
uint8_t RTE_Read_WET_AIR_Value(void)
{
uint8_t Result = 0x00u;
Result = ADC_Read_Signal_Valid(ADC_CH_WETAIR_VOLTAGE);
return Result;
}
......@@ -12,6 +12,7 @@ uint32_t RTE_Read_KL15_Voltage(void);
uint32_t RTE_Read_KL30_Voltage(void);
uint32_t RTE_Read_PRIMARY_AIR_Voltage(void);
uint32_t RTE_Read_SECONDARY_AIR_Voltage(void);
uint32_t RTE_Read_WET_AIR_Voltage(void);
uint32_t RTE_Read_FUEL_REF_Voltage(void) ;
uint32_t RTE_Read_FUEL_R(void) ;
uint32_t RTE_Read_KEY_R(void) ;
......@@ -27,6 +28,7 @@ uint8_t RTE_Read_FUEL_REF_Valid(void) ;
uint8_t RTE_Read_FUEL_R_Valid(void) ;
uint8_t RTE_Read_KEY_R_Valid(void) ;
uint8_t RTE_Read_NTC_R_Valid(void) ;
uint8_t RTE_Read_WET_AIR_Value(void);
......
......@@ -4,9 +4,9 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2021/9/2 9:47:55
* Date : 2021/11/25 15:48:30
* Cfg Tool Ver : 1.1.0
* Engineer : wangboyu
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
*
******************************************************************************/
......@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] =
{
0U, 10U, 9U, 7U, 8U, 11U, 2U,
0U, 10U, 9U, 7U, 8U, 5U, 11U, 2U,
};
const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
......@@ -84,8 +84,9 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{ 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 3U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 4U, 2U, 0U, 3U, 0U, 1U, ADC_Res_Calc_Circuit103,},
{ 5U, 3U, 0U, 5000U, 0U, 10U, ADC_Res_Calc_Circuit101,},
{ 6U, 3U, 0U, 5000U, 0U, 10U, ADC_Res_Calc_Circuit201,},
{ 5U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 6U, 1U, 0U, 0U, 0U, 10U, ADC_Res_Calc_Circuit101,},
{ 7U, 3U, 0U, 5000U, 0U, 10U, ADC_Res_Calc_Circuit201,},
};
const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
......@@ -95,7 +96,8 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{ 0U, 2000000U, 0U, 0U,},
{ 330000U, 100000U, 0U, 0U,},
{ 270000U, 180000U, 1000U, 0U,},
{ 0U, 180000U, 47000U, 0U,},
{ 0U, 2000000U, 0U, 0U,},
{ 0U, 0U, 47000U, 0U,},
{ 0U, 100000U, 100000U, 0U,},
};
......
......@@ -4,9 +4,9 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2021/9/2 9:47:55
* Date : 2021/11/25 15:48:30
* Cfg Tool Ver : 1.1.0
* Engineer : wangboyu
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
*
******************************************************************************/
......@@ -32,13 +32,14 @@ enum ADCChName
ADC_CH_SECONDARY_AIR_VOLTAGE,
ADC_CH_FUEL_REF_VOLTAGE,
ADC_CH_FUEL_R,
ADC_CH_WETAIR_VOLTAGE,
ADC_CH_KEY,
ADC_CH_NTC_R,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (7U)
#define ADC_SIGNAL_CH_NUMBER (7U)
#define ADC_TOTAL_CH_NUMBER (8U)
#define ADC_SIGNAL_CH_NUMBER (8U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
......
......@@ -4,9 +4,9 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2021/11/23 11:42:23
* Date : 2021/11/25 15:48:30
* Cfg Tool Ver : 1.1.0
* Engineer : wangboyu
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
*
******************************************************************************/
......@@ -32,13 +32,14 @@ enum ADCChName
ADC_CH_SECONDARY_AIR_VOLTAGE,
ADC_CH_FUEL_REF_VOLTAGE,
ADC_CH_FUEL_R,
ADC_CH_WETAIR_VOLTAGE,
ADC_CH_KEY,
ADC_CH_NTC_R,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (7U)
#define ADC_SIGNAL_CH_NUMBER (7U)
#define ADC_TOTAL_CH_NUMBER (8U)
#define ADC_SIGNAL_CH_NUMBER (8U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
......
......@@ -4,9 +4,9 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2021/11/23 11:42:23
* Date : 2021/11/25 15:48:30
* Cfg Tool Ver : 1.1.0
* Engineer : wangboyu
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
*
******************************************************************************/
......@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] =
{
0U, 10U, 9U, 7U, 8U, 11U, 2U,
0U, 10U, 9U, 7U, 8U, 5U, 11U, 2U,
};
const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
......@@ -84,8 +84,9 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{ 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 3U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 4U, 2U, 0U, 3U, 0U, 1U, ADC_Res_Calc_Circuit103,},
{ 5U, 1U, 0U, 0U, 0U, 10U, ADC_Res_Calc_Circuit101,},
{ 6U, 3U, 0U, 5000U, 0U, 10U, ADC_Res_Calc_Circuit201,},
{ 5U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 6U, 1U, 0U, 0U, 0U, 10U, ADC_Res_Calc_Circuit101,},
{ 7U, 3U, 0U, 5000U, 0U, 10U, ADC_Res_Calc_Circuit201,},
};
const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
......@@ -95,6 +96,7 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{ 0U, 2000000U, 0U, 0U,},
{ 330000U, 100000U, 0U, 0U,},
{ 270000U, 180000U, 1000U, 0U,},
{ 0U, 2000000U, 0U, 0U,},
{ 0U, 0U, 47000U, 0U,},
{ 0U, 100000U, 100000U, 0U,},
};
......
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