projects
/
svn42.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
light level update
[svn42.git]
/
rf433ctl
/
rf433ctl.pde
diff --git
a/rf433ctl/rf433ctl.pde
b/rf433ctl/rf433ctl.pde
index
f404110
..
6ead8af
100644
(file)
--- a/
rf433ctl/rf433ctl.pde
+++ b/
rf433ctl/rf433ctl.pde
@@
-227,7
+227,7
@@
void updateLightLevel(unsigned int pin)
return;
unsigned int diff = abs(value - light_level_mean_);
- if (diff > 250)
+ if (light_level_mean_ < 6 || diff > 250)
light_level_mean_ = value;
else
light_level_mean_=(unsigned int) ( ((float) light_level_mean_) * 0.98 + ((float)value)*0.02 );