|
@ -82,9 +82,14 @@ float DisinfectionCtrlService::getDisinfectionDValue(float ppm) { |
|
|
float dvalue = 0; |
|
|
float dvalue = 0; |
|
|
|
|
|
|
|
|
if (ppm < 150) { |
|
|
if (ppm < 150) { |
|
|
dvalue = -0.5269 * ppm + 97.868; |
|
|
|
|
|
} else if (ppm >= 150 || ppm < 300) { |
|
|
|
|
|
dvalue = -0.1405 * ppm + 40.369; |
|
|
|
|
|
|
|
|
dvalue = -0.5251 * ppm + 98.154; |
|
|
|
|
|
} else if (ppm >= 150 || ppm < 240) { |
|
|
|
|
|
dvalue = -0.125 * ppm + 38.913; |
|
|
|
|
|
} else if (ppm >= 240) { |
|
|
|
|
|
// 240 -> 8.913
|
|
|
|
|
|
// 1400 -> 2
|
|
|
|
|
|
// y = -0.00603x + 10.4472
|
|
|
|
|
|
dvalue = -0.00596 * ppm + 10.3434; |
|
|
} |
|
|
} |
|
|
if (dvalue < 2) { |
|
|
if (dvalue < 2) { |
|
|
dvalue = 2; |
|
|
dvalue = 2; |
|
@ -157,7 +162,7 @@ void DisinfectionCtrlService::initContext(DisinfectionContext& context, int logl |
|
|
"heating,blower,compressor,pump," //
|
|
|
"heating,blower,compressor,pump," //
|
|
|
"pressure1,pressure2,pressure3,pressure4," //
|
|
|
"pressure1,pressure2,pressure3,pressure4," //
|
|
|
"disinfectantVolume," //
|
|
|
"disinfectantVolume," //
|
|
|
"remaintime\n" //
|
|
|
|
|
|
|
|
|
"remaintime\n" //
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
void DisinfectionCtrlService::finishDisinfection(DisinfectionContext& context) { |
|
|
void DisinfectionCtrlService::finishDisinfection(DisinfectionContext& context) { |
|
@ -234,7 +239,7 @@ void DisinfectionCtrlService::dumpDisinfectionLogsToCSV(DisinfectionContext& con |
|
|
"{},{},{},{}," //
|
|
|
"{},{},{},{}," //
|
|
|
"{},{},{},{}," //
|
|
|
"{},{},{},{}," //
|
|
|
"{}," //
|
|
|
"{}," //
|
|
|
"{}\n" //
|
|
|
|
|
|
|
|
|
"{}\n" //
|
|
|
, |
|
|
, |
|
|
zsteady_clock().elapsedTimeS(m_context.m_starttp), //
|
|
|
zsteady_clock().elapsedTimeS(m_context.m_starttp), //
|
|
|
sensors[0].h2o2, sensors[0].temp, sensors[0].humid, sensors[0].saturation, //
|
|
|
sensors[0].h2o2, sensors[0].temp, sensors[0].humid, sensors[0].saturation, //
|
|
|