refine logic of average and env temp

This commit is contained in:
Yunhorn 2024-01-08 18:50:32 +08:00
parent 22aed14aa1
commit b3caa5db85
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ static void sortFocusAreas(void)
{
temp1 = (float)tempValues[(x) + (y*COL)];
if ((temp1 + (float)(waterTempThreshold / 10.0)) < (float)env_temperature ) // was max(averageTemp, env_temperature))
if ((temp1 + (float)(waterTempThreshold / 10.0)) < (float)(min(averageTemp, env_temperature))) // was max(averageTemp, env_temperature))
{
if (blackOutTag == 0) {
zoneMask[y*COL+x] ++;