projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d715b33
)
light level update
author
Bernhard Tittelbach
<xro@realraum.at>
Mon, 8 Mar 2010 20:54:45 +0000
(20:54 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Mon, 8 Mar 2010 20:54:45 +0000
(20:54 +0000)
rf433ctl/rf433ctl.pde
patch
|
blob
|
history
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 );