A minor error in "light sensor" condition

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

A minor error in "light sensor" condition

Post by MURTUMA » 16 Nov 2014 19:55

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: A minor error in "light sensor" condition

Post by Martin » 18 Nov 2014 18:03

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

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: A minor error in "light sensor" condition

Post by MURTUMA » 18 Nov 2014 18:09

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: A minor error in "light sensor" condition

Post by Martin » 18 Nov 2014 18:37

Hmm, probably some kind of rounding error. I will try to reproduce and fix this in the next update.

Post Reply