This commit is contained in:
2026-03-20 21:16:58 +08:00
parent 286ff98b8e
commit 90c3d919df
248 changed files with 94554 additions and 0 deletions

50
user/Compute/FlowRateCompute.h Executable file
View File

@@ -0,0 +1,50 @@
/********************************************************************************************************
** HY3106<30><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3><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
//******************************************************************************