X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=rf433ctl%2Frf433ctl.pde;h=6f3ec38e3293898d7e49cb9191b30237533f5684;hb=43aae6dc3cf0a030f26d27f7f2c61f3708ff8604;hp=47673143c322f50ce8aefb730da2b4c27b586fc8;hpb=8476c3f31a5e7e8949feb8ae618df8bcb421c991;p=svn42.git diff --git a/rf433ctl/rf433ctl.pde b/rf433ctl/rf433ctl.pde index 4767314..6f3ec38 100644 --- a/rf433ctl/rf433ctl.pde +++ b/rf433ctl/rf433ctl.pde @@ -228,10 +228,10 @@ void updateLightLevel(unsigned int pin) return; unsigned int diff = abs(value - light_level_mean_); - if (light_level_mean_ < 6 || diff > 250) + if (diff > 100) light_level_mean_ = value; else - light_level_mean_=(unsigned int) ( ((float) light_level_mean_) * 0.98 + ((float)value)*0.02 ); + light_level_mean_=(unsigned int) ( ((float) light_level_mean_) * 0.90 + ((float)value)*0.10 ); } void printLightLevel()