aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Waste
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-10-25 00:46:00 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-10-25 00:46:00 +0300
commit06afbbe845af575e943fac296695d33ce8ba2e2f (patch)
tree5d5c2857c7c43d71e425b321eeed5215c9a968da /Software/Embedded_SW/Embedded/Modules/Waste
parenta9b9870cf6a00914d4b336dbf31a6d9f5f377d39 (diff)
downloadTango-06afbbe845af575e943fac296695d33ce8ba2e2f.tar.gz
Tango-06afbbe845af575e943fac296695d33ce8ba2e2f.zip
parameters support for waste prepare
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Waste')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c15
2 files changed, 13 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
index cebfba762..8a075bfd4 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
@@ -47,6 +47,7 @@ bool WHS_IsEmptying();
uint32_t Waste_CheckState(void);
uint32_t Waste_Prepare(void);
bool WHS_IsVocPpmOverAlarmLimit();
+void setWastePrepareValues(float HeadLimit,float WasteLimit);
extern bool ReadingVocEverySec;
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
index 267a4e7be..c87dc88c3 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
@@ -532,25 +532,34 @@ uint32_t Waste_CheckState(void)
}
bool WHS_FlowReady = false,HeadIn_FlowReady = false,HeadOut_FlowReady = false;
uint32_t WasteReadyControlId = 0xFF;
+float AllowedRangeForHeadBlowerDeviation = 0.07,AllowedRangeForWasteBlowerDeviation = 0.20;
+void setWastePrepareValues(float HeadLimit,float WasteLimit)
+{
+ AllowedRangeForHeadBlowerDeviation = HeadLimit;
+ AllowedRangeForWasteBlowerDeviation = WasteLimit;
+}
uint32_t Waste_PrepareCallbak(uint32_t IfIndex, uint32_t ReadValue)
{
bool ready = false, headready = false,whsready = false;
double HeadFlow = GetWHSAirFlow(HEAD_FLOW_METER);
double HeadIn_Flow = PressureSensorGetPressure(HEAD_PT100_ZONE_5_0X84_0);
double HeadOut_Flow = PressureSensorGetPressure(HEAD_PT100_ZONE_7_0X86_0);
- if ((HeadFlow<(headairflow*1.07))&&(HeadFlow>(headairflow*0.93)))
+ if ((HeadFlow<(headairflow*(1+AllowedRangeForWasteBlowerDeviation)))
+ &&(HeadFlow>(headairflow*(1-AllowedRangeForWasteBlowerDeviation))))
{
if (WHS_FlowReady == false)
Report("Module waste WHS_FlowReady ready", __FILE__, __LINE__, (int)(HeadFlow*100), RpMessage, WHS_FlowReady, 0);
WHS_FlowReady = true;
}
- if ((HeadIn_Flow<(headBlowersFlow[0]*1.07))&&(HeadIn_Flow>(headBlowersFlow[0]*0.93)))
+ if ((HeadIn_Flow<(headBlowersFlow[0]*(1+AllowedRangeForHeadBlowerDeviation)))
+ &&(HeadIn_Flow>(headBlowersFlow[0]*(1-AllowedRangeForHeadBlowerDeviation))))
{
if (HeadIn_FlowReady == false)
Report("Module waste HeadIn_FlowReady ready", __FILE__, __LINE__, (int)(HeadIn_Flow*100), RpMessage, HeadIn_FlowReady, 0);
HeadIn_FlowReady = true;
}
- if ((HeadOut_Flow<(headBlowersFlow[1]*1.07))&&(HeadOut_Flow>(headBlowersFlow[1]*0.93)))
+ if ((HeadOut_Flow<(headBlowersFlow[1]*(1+AllowedRangeForHeadBlowerDeviation)))
+ &&(HeadOut_Flow>(headBlowersFlow[1]*(1-AllowedRangeForHeadBlowerDeviation))))
{
if (HeadOut_FlowReady == false)
Report("Module waste HeadOut_FlowReady ready", __FILE__, __LINE__, (int)(HeadOut_Flow*100), RpMessage, WHS_FlowReady, 0);