Commit 4e0fc203 authored by 高士达's avatar 高士达

Merge branch 'lijianshuang' into 'dev'

Lijianshuang

See merge request ty/tianying_ty100!35
parents 6c38846a 37f5e13a
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -275,7 +275,7 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x8000</StartAddress>
<StartAddress>0x0</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
......@@ -339,7 +339,7 @@
<MiscControls></MiscControls>
<Define>USE_STDPERIPH_DRIVER,BAT32G139_64PIN</Define>
<Undefine></Undefine>
<IncludePath>..\..\..\..\Source\Device\Cmsemicon\BAT32A239\RTE;..\..\..\..\Source\Component;..\..\..\..\Source\Device\Cmsemicon\BAT32A239\Library\Driver\include;..\..\..\..\Source\Device\Cmsemicon\BAT32A239\Library\Device\Include;..\..\..\..\Source\Application;..\..\..\..\Source;..\..\..\..\Source\Component\LED_Driver;..\..\..\..\Source\UDS;..\..\..\..\Source\Component\System_Monitor</IncludePath>
<IncludePath>..\..\..\..\Source\Device\Cmsemicon\BAT32A239\RTE;..\..\..\..\Source\Component;..\..\..\..\Source\Device\Cmsemicon\BAT32A239\Library\Driver\include;..\..\..\..\Source\Device\Cmsemicon\BAT32A239\Library\Device\Include;..\..\..\..\Source\Application;..\..\..\..\Source;..\..\..\..\Source\Component\LED_Driver;..\..\..\..\Source\UDS</IncludePath>
</VariousControls>
</Cads>
<Aads>
......@@ -513,6 +513,16 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.h</FilePath>
</File>
<File>
<FileName>Data_TPMS.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\Data_TPMS\Data_TPMS.c</FilePath>
</File>
<File>
<FileName>Data_TPMS.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Data_TPMS\Data_TPMS.h</FilePath>
</File>
<File>
<FileName>FaultCode.c</FileName>
<FileType>1</FileType>
......@@ -573,16 +583,6 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\BLUETOOTH\Protocol_User.h</FilePath>
</File>
<File>
<FileName>Data_TPMS.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\Data_TPMS\Data_TPMS.c</FilePath>
</File>
<File>
<FileName>Data_TPMS.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\Data_TPMS\Data_TPMS.h</FilePath>
</File>
<File>
<FileName>code.c</FileName>
<FileType>1</FileType>
......@@ -808,11 +808,6 @@
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\Line_In\Line_In.lib</FilePath>
</File>
<File>
<FileName>System_Monitor.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.h</FilePath>
</File>
<File>
<FileName>System_Monitor_User.c</FileName>
<FileType>1</FileType>
......@@ -843,11 +838,6 @@
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\Mileage\libMileage_BAT32_V1.07.lib</FilePath>
</File>
<File>
<FileName>System_Monitor.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib</FilePath>
</File>
<File>
<FileName>PowerManagement.lib</FileName>
<FileType>4</FileType>
......@@ -873,6 +863,11 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.c</FilePath>
</File>
<File>
<FileName>System_Monitor.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.h</FilePath>
</File>
</Files>
</Group>
<Group>
......
......@@ -15,13 +15,13 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_app.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_coolant.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\faultcode.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_voltage.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bluetooth.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_crc16.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_lib.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\code.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bu98r10.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\services_mileage_user.__i"
......@@ -37,7 +37,7 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\system_monitor_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\telltales_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\maintenance.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\system_monitor_1.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\system_monitor.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_tick_timer_bat32a239.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_wdt_bat32a239.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\rte_gpio_bat32a239.__i"
......
#include "Protocol_User.h"
#include "RTE.h"
#include "System_Monitor_User.h"
#include "Components.h"
#define UART_TX_MAX_DEPTH 1024UL //(2 * 1024UL) // 4K
#define UART_RX_MAX_DEPTH (2 * 1024UL) // 4K
......
......@@ -8,7 +8,7 @@ st_CanMsgTxOp CAN_CH0_CanMsgTxOp;
const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL] =
{
{0x220ul, 50ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_220, (void *)0},
{0x220ul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_220, (void *)0},
{0x6EEul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_6EE, (void *)0},
{0x6EFul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_6EF, (void *)0},
{0x450ul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_450, (void *)0},
......@@ -26,7 +26,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
1000ul,
0x402ul,
(( void * )0),
(Fault_Code_Receive),
(( void * )0),
(( void * )0),
},
{
......
......@@ -13,7 +13,7 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[])
{
for ( i = 0u; i < 8u; i++ )
{
p220->Msg [ i ] = 0xFFu;
p220->Msg [ i ] = 0x0u;
}
p220 -> Sig.TCS_TX = Get_Dis_Tcs_Val();
......@@ -33,7 +33,7 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{
for ( i = 0u; i < 8u; i++ )
{
p6EE->Msg [ i ] = 0xFFu;
p6EE->Msg [ i ] = 0x0u;
}
p6EE -> Sig.ODO_TX_H = (ODO_tx >> 16) & 0xFF ;
p6EE -> Sig.ODO_TX_M = (ODO_tx >> 8) & 0xFF ;
......@@ -78,7 +78,7 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
{
for ( i = 0u; i < 8u; i++ )
{
p6EF->Msg [ i ] = 0xFFu;
p6EF->Msg [ i ] = 0x0u;
}
p6EF -> Sig.TripA_H = (TripA_tx >> 8) & 0xFF;
p6EF -> Sig.TripA_L = TripA_tx & 0xFF;
......@@ -97,12 +97,29 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
{
for ( i = 0u; i < 8u; i++ )
{
p450->Msg [ i ] = 0xFFu;
p450->Msg [ i ] = 0x0u;
}
p450 -> Sig.Front_Pressure_TX_H = (Get_Front_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Front_Pressure_TX_L = Get_Front_TPMS_TX() & 0xFF;
p450 -> Sig.Rear_Pressure_TX_H = (Get_Rear_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = Get_Rear_TPMS_TX() & 0xFF;
if(MenuData.TPMS_Front_Learn == 0)
{
p450 -> Sig.Front_Pressure_TX_H = 0;
p450 -> Sig.Front_Pressure_TX_L = 0;
}
else
{
p450 -> Sig.Front_Pressure_TX_H = (Get_Front_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Front_Pressure_TX_L = Get_Front_TPMS_TX() & 0xFF;
}
if(MenuData.TPMS_Rear_Learn == 0)
{
p450 -> Sig.Rear_Pressure_TX_H = 0;
p450 -> Sig.Rear_Pressure_TX_L = 0;
}
else
{
p450 -> Sig.Rear_Pressure_TX_H = (Get_Rear_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = Get_Rear_TPMS_TX() & 0xFF;
}
}
}
......@@ -116,7 +133,7 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{
for ( i = 0u; i < 8u; i++ )
{
p580->Msg [ i ] = 0xFFu;
p580->Msg [ i ] = 0x0u;
}
if(Get_Tpms_TX_Flag() == 1)
......
......@@ -10,10 +10,14 @@ typedef struct __attribute__((aligned(4)))
uint8_t Rear_TPMS_Valid;
uint8_t TPMS_Warning;
uint8_t TPMS_Unit;
uint8_t TPMS_LOST;
uint8_t TPMS_Front_Learn;
uint8_t TPMS_Rear_Learn;
uint8_t TPMS_Front_FirstLearn_Flag;
uint8_t TPMS_Rear_FirstLearn_Flag;
uint8_t TPMS_Front_Timeclean;
uint8_t TPMS_Rear_Timeclean;
}_TPMS_Display;
typedef enum
......@@ -36,4 +40,5 @@ uint16_t Get_Front_TPMS_TX (void);
void Data_TPMS_KL15_WAKE_UP_Init ( void );
uint8_t Get_Front_FirstLearn_Flag (void);
uint8_t Get_Rear_FirstLearn_Flag (void);
uint8_t Get_TPMS_CAN_LOST (void);
#endif
......@@ -4,6 +4,7 @@
static uint16_t DataVSpeedActual;
static uint16_t DataVSpeedDisp;
static uint32_t DataVSpeedTarget;
static uint16_t DataVSpeedHysteresis;
static uint8_t DataVSpeedValid;
// static uint16_t DataVSpeedDisp_Mile;
......@@ -34,6 +35,7 @@ void Data_Vehicle_Speed_KL30_Init(void)
DataVSPeedDamping.Dir = DATA_APPR_DIR_INC;
DataVSpeedSampler.Timer1 = 0;
DataVSpeedSampler.Timer = 0;
DataVSpeedTarget = 0;
}
/******************************************************************************
......@@ -53,6 +55,7 @@ void Data_Vehicle_Speed_Wakeup_Init(void)
DataVSPeedDamping.Dir = DATA_APPR_DIR_INC;
DataVSpeedSampler.Timer1 = 0;
DataVSpeedSampler.Timer = 0;
DataVSpeedTarget = 0;
}
/******************************************************************************
......@@ -120,8 +123,8 @@ void Data_Vehicle_Speed_Processing_Service(void)
VSpeed = DataVSpeedSampler.Buffer [ 1 ];
DataVSpeedActual = VSpeed * 10;
}
DataVSpeedSampler.Timer = 0;
DataVSpeedSampler.Timer1 = 0;
//DataVSpeedSampler.Timer = 0;
//DataVSpeedSampler.Timer1 = 0;
DataVSpeedSampler.Backup = DataVSpeedActual;
DataVSpeedValid = 1;
}
......@@ -132,18 +135,128 @@ void Data_Vehicle_Speed_Processing_Service(void)
{
DataVSpeedValid = 0;
DataVSpeedActual = 0;
DataVSpeedSampler.Timer = 0;
DataVSpeedSampler.Timer1 = 0;
//DataVSpeedSampler.Timer = 0;
//DataVSpeedSampler.Timer1 = 0;
DataVSpeedSampler.Cnt = 0;
DataVSpeedSampler.Backup = 0;
}
DataVSpeedTarget = DataVSpeedActual;
if ( DataVSpeedValid )
{
DataVSpeedTarget *= 108;
DataVSpeedTarget /= 100;
if(DataVSpeedTarget > 1990)
{
DataVSpeedTarget = 1990;
}
}
else
{
DataVSpeedTarget = 0;
}
if ( (DataVSpeedTarget >= DataVSpeedHysteresis) || (DataVSpeedTarget < DATA_VSPEED_HYSTERESIS) )
{
DataVSpeedHysteresis = DataVSpeedTarget;
}
else
{
if ( DataVSpeedHysteresis - DataVSpeedTarget >= DATA_VSPEED_HYSTERESIS )
{
DataVSpeedHysteresis = DataVSpeedTarget;
}
}
DataVSpeedSampler.Timer ++;
if(DataVSpeedSampler.Timer >= 10)
{
DataVSpeedSampler.Timer = 0;
if(DataVSpeedDisp < DataVSpeedHysteresis)
{
DataVSPeedDamping.Dir = DATA_APPR_DIR_INC;
}
else if (DataVSpeedDisp > DataVSpeedHysteresis)
{
DataVSPeedDamping.Dir = DATA_APPR_DIR_DEC;
}
else
{
;
}
if ( DataVSPeedDamping.Dir == DATA_APPR_DIR_INC)
{
if (DataVSpeedHysteresis >= DataVSpeedDisp)
{
if (DataVSpeedHysteresis > (DataVSpeedDisp + 400))
{
DataVSpeedDisp += 370;
}
else if (DataVSpeedHysteresis > (DataVSpeedDisp + 150))
{
DataVSpeedDisp += 120;
}
else if (DataVSpeedHysteresis > (DataVSpeedDisp + 50))
{
DataVSpeedDisp += 30;
}
else if (DataVSpeedHysteresis > (DataVSpeedDisp + 10))
{
DataVSpeedDisp += 10;
}
else
{
DataVSpeedDisp = DataVSpeedHysteresis;
}
}
}
else if (DataVSPeedDamping.Dir == DATA_APPR_DIR_DEC)
{
if (DataVSpeedHysteresis < DataVSpeedDisp)
{
if ((DataVSpeedHysteresis + 400) < DataVSpeedDisp)
{
DataVSpeedDisp -= 370;
}
else if ((DataVSpeedHysteresis + 150) < DataVSpeedDisp)
{
DataVSpeedDisp -= 120;
}
else if ((DataVSpeedHysteresis + 50) < DataVSpeedDisp)
{
DataVSpeedDisp -= 30;
}
else if ((DataVSpeedHysteresis + 10) < DataVSpeedDisp)
{
DataVSpeedDisp -= 10;
}
else
{
DataVSpeedDisp = DataVSpeedHysteresis;
}
}
if (DataVSpeedDisp >= 1990)
{
DataVSpeedDisp = 1990;
}
}
}
#if(0)
// 第2步:车速的阻尼处理
VSpeed = DataVSpeedActual;
if ( VSpeed > DataVSPeedDamping.Speed ) // 实际值比当前显示值大时
{
Delta = ( uint16_t )VSpeed - DataVSPeedDamping.Speed;
if ( DataVSPeedDamping.Dir == DATA_APPR_DIR_INC ) // 显示值正在向实际值增加,则维持当前方向调节增加速度
{
if ( DataVSPeedDamping.Delta < Delta ) // 当前增量小于显示值与实际值的差值,则提升增加的速度
......@@ -304,6 +417,7 @@ void Data_Vehicle_Speed_Processing_Service(void)
{
DataVSpeedDisp = 0;
}
#endif
}
/*车速有效位:有效=1,无效=0*/
......
#include "Data_Fuel.h"
#include "Application.h"
#define FUEL_DATA_TIME 25u /*这里填写多长时间采集一个数据,单位ms*/
#define FUEL_DATA_NUM 20u /*燃油电阻采集数据总数 最大255*/
#define FUEL_CAL_START 5u /*数据排序后取中间部分计算平均:起始*/
#define FUEL_CAL_END 15u /*数据排序后取中间部分计算平均:结束*/
#define FUEL_DATA_TIME 10u /*这里填写多长时间采集一个数据,单位ms*/
#define FUEL_DATA_NUM 40u /*燃油电阻采集数据总数 最大255*/
#define FUEL_CAL_START 15u /*数据排序后取中间部分计算平均:起始*/
#define FUEL_CAL_END 25u /*数据排序后取中间部分计算平均:结束*/
#define RETURN_DIFFERENCE 25u /*判断上升或下降的回差,精度0.1*/
#define RETURN_DIFFERENCE 15u /*判断上升或下降的回差,精度0.1*/
#define FUEL_SEG_UP 0u
#define FUEL_SEG_DOWN 1u
......@@ -67,7 +67,8 @@ void Fuel_R_Cal(uint8_t deltaTime)
static uint16_t timeCount = 0;
if(FuelStateInitFlag)
if((FuelStateInitFlag) && (ADC_Read_Signal_Valid(ADC_CH_FUEL1)))
{
FuelR = ADC_Read_Signal(ADC_CH_FUEL1);
}
......
......@@ -112,15 +112,8 @@ void Gauge_Service(void)
// BU98R10Chip1DDRAM.Byte[i] = 0x77;
//}
if (VSpeed_Count < 3)
{
VSpeed_Count++;
}
else
{
VSpeed_Count = 0;
SEG_SET_VSpeed_NUM(1u, Get_DispVechileSpeed( ) / 10u,Get_Dis_KM_Unit());
}
SEG_SET_VSpeed_NUM(1u, Get_DispVechileSpeed( ) / 10u,Get_Dis_KM_Unit());
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(Get_Dis_KM_Unit(), Get_ODO_Value() / 10u, Get_Trip_Value());
Gauge_Clock_Display();
......@@ -152,7 +145,9 @@ void Gauge_Service(void)
LED_Driver_Channel_Set(LampChannel_0, LampCh0_19_Navigator2, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_Length2, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_18_Length1, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_ARRIVED_SERVICE_AREA, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_ARRIVED_TOLLGATE, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_16_ARRIVED_TUNNEL, LED_OFF);
}
}
......
......@@ -9,8 +9,8 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_TurnLeft, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_TurnRight, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 40U, 20U, Get_LINE_IN_HighBeam, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_FAULT_ELECTROSPRAY, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Fault_ABS, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 120U, 20U, Get_LINE_IN_FAULT_ELECTROSPRAY, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 170U, 20U, Get_LINE_IN_Fault_ABS, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 500U, 20U, Get_LINE_IN_Oil_Pressure, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Auto_Start_Stop, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Little_Lamp, },
......
......@@ -5,8 +5,8 @@
#include "wdt.h"
#define u16Base_Vol 0u
#define u16ENTER_LOW_N_RANGE 6500U
#define u16EXIT_LOW_N_RANGE 7000U
#define u16ENTER_LOW_N_RANGE 7000U
#define u16EXIT_LOW_N_RANGE 7500U
#define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U
......@@ -20,7 +20,7 @@
void Delay_ms(uint32_t u32Ms);
// #pragma alignvar(8)
static const monitorlib_uint16_t SysFun_Range[24u] = {
static const monitorlib_uint16_t SysFun_Range[26u] = {
u16Base_Vol,
u16ENTER_LOW_N_RANGE,
......@@ -36,7 +36,7 @@ static const monitorlib_uint16_t SysFun_Range[24u] = {
u16ENTER_HIGH_N_RANGE,
u16Top_Vol,
500, /* 进入异常电压时间 1S */
2500, /* 进入异常电压时间 5S */
50u, /* KL15消抖时间 100ms*/
u16Base_Vol,
......@@ -55,6 +55,9 @@ static const monitorlib_uint16_t SysFun_Range[24u] = {
u16Top_Vol,
2u,
2u,
2u,
0u,
};
monitorlib_uint16_t Sys_Read_KL30_Voltage_F(void)
......@@ -101,17 +104,29 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void)
monitorlib_uint8_t System_LINE_KL15(void)
{
monitorlib_uint8_t u8KL15 = 0;
if (RTE_GPIO_Get_Level(WAKEUP_KL15_In) == 1u )
static monitorlib_uint8_t u8KL15 = 0;
//if (RTE_GPIO_Get_Level(WAKEUP_KL15_In) == 1u )
//{
// u8KL15 = 1u;
//}
//else
//{
// u8KL15 = 0;
//}
if (Sys_Read_KL15_Voltage() >= 5500u )
{
u8KL15 = 1u;
}
else
else if((Sys_Read_KL15_Voltage() >= 5000u)&&(Sys_Read_KL15_Voltage() < 5500u))
{
;
}
else
{
u8KL15 = 0;
}
return u8KL15;
}
......@@ -136,8 +151,8 @@ void Sys_KL30_Init(void)
m_st.SysGet_KL15_value_Force = Sys_Read_KL15_Voltage_F;
m_st.SysGet_KL30_value_Force = Sys_Read_KL30_Voltage_F;
m_st.SysMonitorLogic = Sys_LogicProcess;
System_Monitor_KL30Init();
Sys_Set_Pata(SysFun_Range, &m_st);
System_Monitor_KL30Init();
}
void Sys_WakeUp_Init(void)
......@@ -152,8 +167,8 @@ void Sys_WakeUp_Init(void)
m_st.SysGet_KL15_value_Force = Sys_Read_KL15_Voltage_F;
m_st.SysGet_KL30_value_Force = Sys_Read_KL30_Voltage_F;
m_st.SysMonitorLogic = Sys_LogicProcess;
System_Monitor_WakeupInit();
Sys_Set_Pata(SysFun_Range, &m_st);
System_Monitor_WakeupInit();
}
void Delay_ms(uint32_t u32Ms)
......
......@@ -296,7 +296,7 @@ static Tellib_uint16_t LED_Coolant_Judgement(void)
}
else
{
LED_STATE = 1;
LED_STATE = 4;
}
return LED_STATE;
}
......@@ -330,12 +330,18 @@ static void LED_Coolant_Execution(Tellib_uint16_t led_status)
SEG_SET_LED_STS(em_SEG_Coolant, 0);
}
}
else if ( led_status == 1u )
else if ( led_status == 4u )
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_Temp_AlarmW, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Temp_AlarmR, LED_OFF);
SEG_SET_LED_STS(em_SEG_Coolant, 1);
}
}
else if ( led_status == 1u )
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_Temp_AlarmW, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Temp_AlarmR, LED_ON);
SEG_SET_LED_STS(em_SEG_Coolant, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_Temp_AlarmW, LED_OFF);
......@@ -615,14 +621,22 @@ static void LED_Lateral_Strut_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Tire_Pressure_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if(Get_Led_TPMS_Waring() == 1)
if((Get_Front_FirstLearn_Flag() == 2) || (Get_Rear_FirstLearn_Flag() == 2))
{
LED_STATE = 1;
if(Get_Led_TPMS_Waring() == 1)
{
LED_STATE = 1;
}
else
{
LED_STATE = 2;
}
}
else
{
LED_STATE = 2;
}
return LED_STATE;
}
static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status)
......
......@@ -64,7 +64,7 @@ void Sys_20ms_Tasks(void)
Data_Vehicle_Speed_Processing_Service();
Data_Engine_Speed_Processing_Service();
Data_Coolant_Temp_Processing_Service();
Data_Voltage_Processing_Service();
//Data_Voltage_Processing_Service();
}
......@@ -91,7 +91,7 @@ void Sys_100ms_Tasks(void)
Fuel_Cal_Sevice(100u);
BackLight_Process();
Services_Mileage_Callback();
//Data_Voltage_Processing_Service();
Data_Voltage_Processing_Service();
S3_ServerCNTT();
//ECU_FaultCode_Processing_Service();
Send_UUID_To_Esp32();
......
......@@ -314,10 +314,10 @@
#define SWV 0x100 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x103 // 0x100 = 1.00 internal version 内部版本号
#define INTLV 0x104 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x06 // 0x03 = 3月, program month
#define PROG_D 0x19 // 0x19 = 19日, program day
#define PROG_D 0x26 // 0x19 = 19日, program day
/******************************************************************************
Bootloader Variable
......
#new Option
#Wed Jun 19 19:12:31 CST 2024
#Wed Jun 26 11:58:06 CST 2024
IsSort=true
MergeFlashIsCompression=false
ChangeAppFilePath=
MergeCanXLSPath=
MergeCanXLSPath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Can_BDF\\Can\u914D\u7F6E20240626115754122931.xls
RH850_D1M1AGPIOJSONpath=
DBFFilePath=
MergeCrcTtpe=21
......@@ -11,7 +11,7 @@ MergeBootFilePath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Boo
IsMergeChangeAddress=false
MergeFlashOutPutFilePath=
GPIOOutPutPath=
MergeCanDBCPath=
MergeCanDBCPath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Can_BDF\\tianying.dbc
IsFilling=true
RxID=789
MergeAudioInPutPath=
......@@ -32,7 +32,7 @@ IsMergeCreateBin=false
IsOverWrite=false
DllFilePath=
MergeAudioOutPutPath=
MergeCanOutPutPath=
MergeCanOutPutPath=D\:\\Git\\\u5929\u9E70\\tianying_ty100\\Firmware\\utility\\Can_BDF
ChangeOutPutFilePath=
MergeTelltalesOutPutPath=
TTFExtractTXTpath=
......
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