mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
51_I2C_TSL2561: fix calculation of lux value is floatArithmetics is used (forum id #379754)
git-svn-id: https://svn.fhem.de/fhem/trunk@10268 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8b09aaa14b
commit
6c3c94cc73
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 51_I2C_TSL2561: correct lux calculation floatArithmetics case
|
||||
- feature: YAMAHA_AVR: add pointer to main zone in Internals for zone defs
|
||||
- change: YAMAHA_AVR: DSP based models use command queue of main zone
|
||||
to execute commands for zone definitions
|
||||
|
@ -1196,7 +1196,7 @@ sub I2C_TSL2561_CalculateLux($) {
|
||||
if ($hash->{tsl2561Package} == TSL2561_PACKAGE_CS) {
|
||||
# CS package
|
||||
if ($ratio <= 0.52) {
|
||||
$lux = 0.0315*$channel0 - 0.0593*$channel1*pow($ratio, 1.4);
|
||||
$lux = 0.0315*$channel0 - 0.0593*$channel0*pow($ratio, 1.4);
|
||||
} elsif ($ratio <= 0.65) {
|
||||
$lux = 0.0229*$channel0 - 0.0291*$channel1;
|
||||
} elsif ($ratio <= 0.80) {
|
||||
@ -1209,7 +1209,7 @@ sub I2C_TSL2561_CalculateLux($) {
|
||||
} else {
|
||||
# T, FN and CL package
|
||||
if ($ratio <= 0.50) {
|
||||
$lux = 0.0304*$channel0 - 0.062*$channel1*pow($ratio, 1.4);
|
||||
$lux = 0.0304*$channel0 - 0.062*$channel0*pow($ratio, 1.4);
|
||||
} elsif ($ratio <= 0.61) {
|
||||
$lux = 0.0224*$channel0 - 0.031*$channel1;
|
||||
} elsif ($ratio <= 0.80) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user