Commit c25b3e33 authored by hu's avatar hu

删除无用函数

parent 7443c284
......@@ -55,8 +55,6 @@
.\APP\Data_Voltmeter\Data_Voltmeter.h
.\APP\Data_WET\Data_WET.c
.\APP\Data_WET\Data_WET.h
.\APP\Individual_ECU_Comm\Individual_ECU_Comm.c
.\APP\Individual_ECU_Comm\Individual_ECU_Comm.h
.\APP\Data_FuelConsump\Data_FuelConsump.c
.\APP\Data_FuelConsump\Data_FuelConsump.h
.\APP\Data_Interval\Services_Interval.c
......
No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 310124
project .rodata 410879
project .text 309372
project .rodata 410815
project .secinfo 120
project .syscall 6
project .romdata 9045
......
......@@ -3,7 +3,7 @@
#include "GaugesInterface.h"
#include "GPIO.h"
//-------------------------------------------
//水温数据处理 wangboyu
//水温数据处理
//-------------------------------------------
//断码显示
//-------------------------------------------
......
......@@ -5,7 +5,7 @@
#include "GPIO.h"
#include "Services_ODO_User.h"
//-------------------------------------------
//燃油 数据处理 wangboyu 2021-8-31 15:19:14
//燃油 数据处理
//-------------------------------------------
// 342 - 4.2.燃油表
//-------------------------------------------
......
......@@ -2,7 +2,7 @@
#include "RTE_ADC.h"
#include "GaugesInterface.h"
//-------------------------------------------
//电压计数据处理 wangboyu
//电压计数据处理
//-------------------------------------------
//区域5显示逻辑
//-------------------------------------------
......@@ -16,7 +16,7 @@ static struct
uint8_t Gui_Voltmeter ;
uint8_t Valid ;
uint16_t AvrVoltage ;
}VoltmeterVariable ;
} VoltmeterVariable ;
static void Data_Voltmeter_2_Gui(void);
static uint16_t Get_VoltFilter(void);
......@@ -79,7 +79,7 @@ static uint16_t Get_VoltFilter(void)
uint8_t Valid = 0 ;
uint16_t Voltage = 0 ;
Valid = RTE_Read_KL30_Valid() ;
if(Valid)
if (Valid)
{
Voltage = (uint16_t)RTE_Read_KL30_Voltage();
if (VoltmeterVariable.SumCnt < 10u)
......@@ -114,17 +114,17 @@ static void Data_Voltmeter_2_Gui(void)
VoltmeterVariable.AvrVoltage = Get_VoltFilter();
if((VoltmeterVariable.AvrVoltage >= 17000)&&(VoltmeterVariable.AvrVoltage <= 30500))
if ((VoltmeterVariable.AvrVoltage >= 17000) && (VoltmeterVariable.AvrVoltage <= 30500))
{
VoltmeterVariable.Valid = 1 ;
VoltmeterVariable.Timer = 0 ;
}
else
{//检测出范围以外数据时的处理
if(VoltmeterVariable.Timer < (2000 / 20))
{//未到2sec前保持原图像
{
//检测出范围以外数据时的处理
if (VoltmeterVariable.Timer < (2000 / 20))
{
//未到2sec前保持原图像
VoltmeterVariable.Timer ++ ;
}
else
......@@ -133,7 +133,7 @@ static void Data_Voltmeter_2_Gui(void)
}
}
if(VoltmeterVariable.Valid)
if (VoltmeterVariable.Valid)
{
SetGaugesPara(VoltGauges, VoltmeterVariable.AvrVoltage);
u8GuiMode = GetGaugesCurrentPos(VoltGauges);
......
......@@ -4,7 +4,7 @@
#include "CAN_Communication_Matrix.h"
//-------------------------------------------
//WET空气计 数据处理 wangboyu
//WET空气计 数据处理
//-------------------------------------------
//区域1显示逻辑
//-------------------------------------------
......@@ -16,7 +16,7 @@ static struct
uint8_t SumCnt ;
uint32_t Voltage ;
uint16_t Result ;
}WET_Filter ;
} WET_Filter ;
/*-------------------------------------------------------------------------
* Function Name : WET_KL30_Init
......@@ -73,14 +73,14 @@ void WET_AdcData_Filter(void)
//u8WETValid = RTE_Read_WET_Valid();
if(u8WETValid)
if (u8WETValid)
{
if(WET_Filter.SumCnt < 50)
if (WET_Filter.SumCnt < 50)
{
WET_Filter.SumCnt ++ ;
//WETVoltage = RTE_Read_WET_Voltage() ;
WET_Filter.Voltage += WETVoltage ;
WETVoltage = (uint16_t)(WET_Filter.Voltage/WET_Filter.SumCnt) ;
WETVoltage = (uint16_t)(WET_Filter.Voltage / WET_Filter.SumCnt) ;
}
else
{
......@@ -89,7 +89,7 @@ void WET_AdcData_Filter(void)
//WETVoltage = RTE_Read_WET_Voltage() ;
WET_Filter.SumCnt ++ ;
WET_Filter.Voltage += WETVoltage ;
WETVoltage = (uint16_t)(WET_Filter.Voltage/WET_Filter.SumCnt) ;
WETVoltage = (uint16_t)(WET_Filter.Voltage / WET_Filter.SumCnt) ;
}
}
else
......
#ifndef INDIVIDUAL_ECU_COMM_H
#define INDIVIDUAL_ECU_COMM_H
#include "TYW_stdint.h"
typedef enum
{
ID_TripA_AvrFuelCost = 0 ,//Trip A平均油耗
ID_TripA_AvrSpeed ,//Trip A平均车速
ID_TripA_ConsDyeingFee ,//Trip A燃費消耗量
ID_TripA_IdleSpeedTime ,//Trip A怠速时间
ID_TripA_RunTime ,//Trip A运行时间
ID_TripB_AvrFuelCost ,//Trip B平均油耗
ID_TripB_AvrSpeed ,//Trip B平均车速
ID_TripB_ConsDyeingFee ,//Trip B燃费消耗量
ID_TripB_IdleSpeedTime ,//Trip B怠速时间
ID_TripB_RunTime ,//Trip B运行时间
ID_ResidualDistance ,//发动机油&滤清器残留距离 (m)
ID_HowMany ,//起动机剩余次数(回)
ID_AlarmThreshold ,//发动机油&滤清器警报阈值 (m)
ID18FEAE17_TYPE_MAX ,
}ID18FEAE17_TYPE ;
extern const uint8_t IDAE17_TYTE_DATA[ID18FEAE17_TYPE_MAX];
typedef enum
{
METER_CODE_DATA_T_REQ = 0 , //普通数据传输请求
METER_CODE_DATA_CLR_REQ , //清除数据要求
METER_CODE_DATA_W_REQ , //数据改写要求
ECU_CODE_DATA_T_Y_RESPONSE , //常用数据发送肯定应答
ECU_CODE_DATA_CLR_Y_RESPONSE , //清除数据的肯定应答
ECU_CODE_DATA_W_Y_RESPONSE , //改写数据肯定应答
ECU_CODE_DATA_N_RESPONSE , //否定应答
COMM_CODE_MAX_NUM ,
}en_CommSta ;
extern void Individual_ECU_Comm_KL30_Init(void);
extern void Individual_ECU_Comm_KL15_ON_Init(void);
extern void Individual_ECU_Comm_KL15_OFF_Init(void);
extern void Individual_ECU_Comm_Wakeup_Init(void);
extern void Individual_ECU_Comm_Sleep_Init(void);
extern void Individual_ECU_Comm_Processing_Service(void);
extern void RevMsg_ID18EF1718_Cbk(void);
extern void Individual_ECU_Comm_Processing_Service(void);
extern void Set_Meter_RequestCode(en_CommSta Code,ID18FEAE17_TYPE Type,uint32_t Data) ;//应用发起
extern void Meter_RequestCode_Update(void);
extern en_CommSta Get_Meter_RequestID(void) ;
extern uint8_t Get_Meter_RequestCode(void);
extern ID18FEAE17_TYPE Get_Meter_RequestType(void);
extern uint32_t Get_Meter_RequestData(ID18FEAE17_TYPE Type);
extern uint8_t Get_ECU_RespErr(void);
extern uint8_t Get_ECU_RespSure(void);
extern uint32_t Get_ECU_Data(ID18FEAE17_TYPE Type);
#endif
......@@ -40,7 +40,6 @@
#include "IS31FL3236.h"
#include "GUI.h"
#include "Individual_ECU_Comm.h"
#include "Data_Fuel_User.h"
#define POWER_NM_SLEEP 0U
......@@ -106,7 +105,6 @@ Power_Status_t Power_KL30_Init ( void )
/*按键部分 杨真东维护结束*/
AirPressure_KL30_Init();
Individual_ECU_Comm_KL30_Init();
/*报警调度初始化*/
Popup_Scheduler_Init();
/*报警调度初始化*/
......
#include "CAN_Communication_Matrix.h"
#include "CAN_FUNC.h"
#include "Individual_ECU_Comm.h"
/* 2021/09/22 11:03:12 */
const st_CAN_SendAttribute st_CANSendAttr[ID_SEND_TOTAL] =
......
......@@ -11,7 +11,6 @@
#include "Data_CoolantTemperature.h"
#include "Data_Voltmeter.h"
#include "Data_AirPressure.h"
#include "Individual_ECU_Comm.h"
#include "RTE_TIME.h"
#include "Services_Mileage.h"
#include "RTE_ADC.h"
......@@ -258,88 +257,10 @@ void Can_Set_Buff_18FEE617(uint8_t CopyData [])
* onther : None
--------------------------------------------------------------------------*/
const uint8_t IDAE17_TYTE_DATA[ID18FEAE17_TYPE_MAX] = {0x50, 0x51, 0x52, 0x53, 0x54, 0x60, 0x61, 0x62, 0x63, 0x64, 0x20, 0x22, 0x30};
static const uint8_t IDAE17_SendOrder[ID18FEAE17_TYPE_MAX][2U] =
{
// A B
{ID_AlarmThreshold , ID_TripA_AvrFuelCost },
{ID_TripA_AvrFuelCost , ID_TripA_AvrSpeed },
{ID_TripA_AvrSpeed , ID_TripA_ConsDyeingFee },
{ID_TripA_ConsDyeingFee , ID_TripA_IdleSpeedTime },
{ID_TripA_IdleSpeedTime , ID_TripA_RunTime },
{ID_TripA_RunTime , ID_TripB_AvrFuelCost },
{ID_TripB_AvrFuelCost , ID_TripB_AvrSpeed },
{ID_TripB_AvrSpeed , ID_TripB_ConsDyeingFee },
{ID_TripB_ConsDyeingFee , ID_TripB_IdleSpeedTime },
{ID_TripB_IdleSpeedTime , ID_TripB_RunTime },
{ID_TripB_RunTime , ID_ResidualDistance },
{ID_ResidualDistance , ID_HowMany },
{ID_HowMany , ID_AlarmThreshold },
};
//Byte:6为最高级别Byte,Byte:3为最低级别Byte
void Can_Set_Buff_18EF1817(uint8_t CopyData [])
{
static uint8_t Count = 0 ;
uint8_t Type ;
uint8_t i = 0 ;
for (i = 0 ; i < 8 ; i ++)
{
CopyData[ i ] = 0xff ;
}
Meter_RequestCode_Update();
CopyData[ 0 ] = Get_Meter_RequestCode();
if (Get_Meter_RequestID() == METER_CODE_DATA_T_REQ)
{
//A
Type = IDAE17_SendOrder[Count][0];
//B
//Type = IDAE17_SendOrder[Count][1];
CopyData[ 1 ] = IDAE17_TYTE_DATA[Type] ;
if (Get_ECU_RespSure())
{
CopyData[ 2 ] = (uint8_t)Get_ECU_Data(Type);
CopyData[ 3 ] = (uint8_t)(Get_ECU_Data(Type) >> 8);
CopyData[ 4 ] = (uint8_t)(Get_ECU_Data(Type) >> 16);
CopyData[ 5 ] = (uint8_t)(Get_ECU_Data(Type) >> 24);
}
else
{
CopyData[ 2 ] = 0xff ;
CopyData[ 3 ] = 0xff ;
CopyData[ 4 ] = 0xff ;
CopyData[ 5 ] = 0xff ;
}
Count ++ ;
if (Count >= ID18FEAE17_TYPE_MAX)
{
Count = 0 ;
}
}
else
{
CopyData[ 1 ] = IDAE17_TYTE_DATA[Get_Meter_RequestType()] ;
if (Get_ECU_RespSure())
{
Set_Meter_RequestCode(METER_CODE_DATA_T_REQ, ID_TripA_AvrFuelCost, 0);
}
else
{
CopyData[ 2 ] = (uint8_t)Get_Meter_RequestData(Type);
CopyData[ 3 ] = (uint8_t)(Get_Meter_RequestData(Type) >> 8);
CopyData[ 4 ] = (uint8_t)(Get_Meter_RequestData(Type) >> 16);
CopyData[ 5 ] = (uint8_t)(Get_Meter_RequestData(Type) >> 24);
}
}
//0xFF固定送信
CopyData[ 6 ] = 0xff ;
CopyData[ 7 ] = 0xff ;
}
......
......@@ -78,7 +78,6 @@
#include "Data_FuelConsump.h"
#include "IS31FL3236.h"
#include "Individual_ECU_Comm.h"
#include "TimerB.h"
#include "BU98R10.h"
......@@ -160,7 +159,6 @@ void Sys_Run_Mode_10ms_Tasks(void)
------------------------------------------------------------------------------*/
void Sys_Run_Mode_20ms_Tasks(void)
{
Individual_ECU_Comm_Processing_Service();
Coolant_Processing_Service();
Tacho_Processing_Service();
Speed_Processing_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