Page 1 of 1

A minor error in "light sensor" condition

Posted: 16 Nov 2014 19:55
by MURTUMA
I have the condition set as over 1000 lux. The condition returns a value 1000.0 but it still follows true path. Not sure if that's by design but mathematically that's wrong. The same happens if I select under 1000. It follows true path, even though thats wrong.

Also, I use SGS+ (GB) which has pretty bad light sensor so it only reports very high or very low values. I mentioned this just in case, although, it shouldn't matter here.

Re: A minor error in "light sensor" condition

Posted: 18 Nov 2014 18:03
by Martin
Hi,

The condition checks if the value is < 1000 or >= 1000. I think I will adjust the generated default name so that the behavior of the condition stays the same.
Thanks for reporting!

Does the condition really evaluate to true when <1000 is set and the value is exactly 1000?

Regards,
Martin

Re: A minor error in "light sensor" condition

Posted: 18 Nov 2014 18:09
by MURTUMA
As I stated, mu phone (SGS±) has wery crappy light sensor. The values I've seen it to report are 6, 1000 and 6000. They are all excact numbers.

No matter, if I set the condition to under or over. The set condition alvays returns true, when the limit is the same as light level.

Re: A minor error in "light sensor" condition

Posted: 18 Nov 2014 18:37
by Martin
Hmm, probably some kind of rounding error. I will try to reproduce and fix this in the next update.