51 lines
2.1 KiB
C
51 lines
2.1 KiB
C
|
|
/********************************************************************************************************
|
|||
|
|
** HY3106<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>
|
|||
|
|
**
|
|||
|
|
** Copyright (c) Siargo, Ltd. 2011
|
|||
|
|
** All Rights Reserved.
|
|||
|
|
**
|
|||
|
|
**-------------------------------------------------------------------------------------------------------
|
|||
|
|
********************************************************************************************************/
|
|||
|
|
#ifndef __FlowRateCompute_h__
|
|||
|
|
#define __FlowRateCompute_h__
|
|||
|
|
|
|||
|
|
#define CURVE_1ST 0
|
|||
|
|
#define CURVE_2ND 1
|
|||
|
|
#define CURVE_3RD 2
|
|||
|
|
|
|||
|
|
extern u16 FIndexSample[], filterShift, dataMask, filterDepth;
|
|||
|
|
extern u32 maxAlarmFlowRate;
|
|||
|
|
extern u32 flowSample[], DisSample[];
|
|||
|
|
//==============================================================================
|
|||
|
|
u32 GetFlowRate(u16 flowIndex, u16 curveType);
|
|||
|
|
//void FlowRateAlarmJudgment(void);
|
|||
|
|
void FlowRateAlarmJudgment(void);
|
|||
|
|
u8 FlowRateModeDetect(void);
|
|||
|
|
|
|||
|
|
u16 HalfWordMovingAverage(u16 *TPFilter, u16 shiftCompare, u16 updateScale);
|
|||
|
|
u32 WordMovingAverage(u32 *TPFilter, u32 shiftCompare, u16 updateScale);
|
|||
|
|
void GetFilterDepth(u16 timeIndex);
|
|||
|
|
u16 FlowRateIndexFilter(u16 filterANX, u16 updateScale);
|
|||
|
|
void FlowRateMoving(void);
|
|||
|
|
void CurrentFlowRateMoving(void);
|
|||
|
|
void DisplayFlowRateMoving(void);
|
|||
|
|
|
|||
|
|
//------------------------------------------------------------------------------
|
|||
|
|
#ifndef ENABLE_LEAK_DETECT
|
|||
|
|
#pragma message("[undefined] ENABLE_LEAK_DETECT")
|
|||
|
|
#elif(ENABLE_LEAK_DETECT)
|
|||
|
|
extern u16 leakDetectLowCounter, leakDetectHighCounter, leakDetectCounter;
|
|||
|
|
void FlowRateLeakDetect(void);
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//------------------------------------------------------------------------------
|
|||
|
|
#ifndef ENABLE_FLOW_GAIN
|
|||
|
|
#pragma message("[undefined] ENABLE_FLOW_GAIN")
|
|||
|
|
#elif(ENABLE_FLOW_GAIN)
|
|||
|
|
u16 JudgeFlowRateGain(u16 flowGain);
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//******************************************************************************
|
|||
|
|
#endif
|
|||
|
|
//******************************************************************************
|