projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8476c3f
)
light resistor instead of light diode
author
Bernhard Tittelbach
<xro@realraum.at>
Fri, 23 Apr 2010 21:14:23 +0000
(21:14 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Fri, 23 Apr 2010 21:14:23 +0000
(21:14 +0000)
rf433ctl/rf433ctl.pde
patch
|
blob
|
history
diff --git
a/rf433ctl/rf433ctl.pde
b/rf433ctl/rf433ctl.pde
index
4767314
..
6f3ec38
100644
(file)
--- 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()