123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- /********************************************************************************
- * 常州易控汽车电子股份有限公司
- * (c) Copyright 2009-2018 ECTEK
- * 保留所有权利
- ********************************************************************************
- * 工程名称:整车管理_车辆运动
- * 文件名: AccPedCD.h
- * 功能描述 : 油门踏板模块驱动头文件
- * 引用记录:
- * 备注:
- * 修订记录:
- * 日期 版本 作者 描述
- * 2018.01.12 00.01.00 李中 第一版
- *******************************************************************************/
- #ifndef __ACCPEDCD_H
- #define __ACCPEDCD_H
- #include "Std_Types.h"
- /*********************************************************************************************/
- /*样例代码*/
- #ifdef _SAMPLE_CODE_
- /*************************************************************/
- /*标定数据区开始(请不要在该区域加入非标定数据相关的内容) */
- typedef struct
- {
- uint16 xSize;
- uint16 xDist[4];
- uint16 values[4];
- }AccPedCD_rUW_CUR_TYPE;
- #define MAPDATA_START_SEC_VAR_CONST
- #include "MemMap.h"
- /*AccPedCD_Cal*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_uSRCMaxUW_C; /*AccPedCD_uSRCMaxUW_C,最大值*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_uSRCMinUW_C; /*AccPedCD_uSRCMinUW_C,最小值*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_uMaxDiffUW_C; /*AccPedCD_uMaxDiffUW_C,AccPed2与AccPed1最大相差多少...*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_uHighLimIdleUW_C; /*AccPedCD_uHighLimIdleUW_C,怠速开关高限*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_uLowLimIdleUW_C; /*AccPedCD_uLowLimIdleUW_C,怠速开关低限*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_bPlausEnUW_C; /*AccPedCD_bPlausEnUW_C,油门合理性检测是否启用*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_rFltUW_C; /*数字油门,AccPedCD_rFltUW_C*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_bDigEnUW_C; /*油门控制模式,AccPedCD_bDigEnUW_C, 1为正常控制, 0为数字油门*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_swtUseUW_C; /*AccPedCD_swtUseUW_C,油门传感器类型,1:双油门,2:怠速开关,3:单油门*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_idxIdleSwtTypeUW_C; /*AccPedCD_idxIdleSwtTypeUW_C,怠速开关类型 ,0:接电源常开,1:接电源常闭,2:接地常开,3:接地常闭*/
- extern PRAGMA_MAPDATA const AccPedCD_rUW_CUR_TYPE AccPedCD_rUW_CUR; /*油门标定,AccPedCD_rUW_CUR,系数256,单位%*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_rThresFltLowPosUW_C; /*AccPedCD_rThresFltLowPosUW_C,小油门限*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_rThresFltMidPosUW_C; /*AccPedCD_rThresFltMidPosUW_C,中油门限*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1LowNegUW_C; /*AccPedCD_facT1LowNegUW_C,小油门负向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1MidNegUW_C; /*AccPedCD_facT1MidNegUW_C,中油门负向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1HighNegUW_C; /*AccPedCD_facT1HighNegUW_C,大油门负向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1LowPosUW_C; /*AccPedCD_facT1LowPosUW_C,小油门正向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1MidPosUW_C; /*AccPedCD_facT1MidPosUW_C,中油门正向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1HighPosUW_C; /*AccPedCD_facT1HighPosUW_C,大油门正向滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_duThresStationaryUW_C; /*AccPedCD_duThresStationaryUW_C,稳态油门变化范围*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facT1StationaryUW_C; /*AccPedCD_facT1StationaryUW_C,稳态滤波系数*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_facDualRelUW_C; /*AccPedCD_facDualRelUW_C, 双油门两路信号的比例关系,第一路/第二路*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_drHealRmpUp_C; /*AccPedCD_drHealRmpUp_C; 加速踏板故障恢复正向Ramp步长。APPCD_drHealRmpUp_C: healing ramp pos. slope<value>*/
- extern PRAGMA_MAPDATA const uint16 AccPedCD_drHealRmpDwn_C; /*AccPedCD_drHealRmpDwn_C; 故障恢复时向下Ramp步长; APPCD_drHealRmpDwn_C: healing ramp neg. slope<value>*/
- #define MAPDATA_STOP_SEC_VAR_CONST
- #include "MemMap.h"
- /*标定数据区结束 */
- /*************************************************************/
-
- #define _ACCPED_DELTA_MONITOR_TIME 100 /*油门斜率计算频率为1s*/
- void AccPedCD_Init(void);
-
- void AccPedCD_Filter(void);
-
- void AccPedCD_DualAnalog(void);//双油门
- void AccPedCD_Switch(void); //带怠速开关的油门
- void AccPedCD_SingleAnalog(void); //单油门
- void AccPedCD_Update(void);
- void AccPedCD_Monitor(void);
- extern uint16 AccPedCD_rUW; //滤波前加速踏板位置
- extern uint16 AccPedCD_rFltUW; //油门踏板位置
- extern uint16 AccPedCD_rRawUW; //由电压值直接查表得到的位置
- extern uint16 AccPedCD_uUW,AccPedCD_u2UW;
- extern sint16 AccPedCD_drUnFltW; //油门踏板斜率
- extern uint16 AccPedCD_rOldUW; //上一时刻油门踏板,用于斜率计算
-
- #endif //_SAMPLE_CODE_
- /*********************************************************************************************/
-
- #endif
|