1) Override
Honor an optional override item when determining action brightness.
Made existing mechanism for override by state of 99 or 100
configurable to allow turning it off when it doesn't apply. Refactored
light_action to eliminate duplicate code.
2) Lux antiflap
Add notion of configurable lux threshold buffer to handle flapping lux
sensor. As long as lux sensor reading variations stay within the buffer
size no new threshold breaches are detected avoiding resulting actions
to flap between on and off. Refactored to gracefully handle NULL items.
1) Override Honor an optional override item when determining action brightness. Made existing mechanism for override by state of 99 or 100 configurable to allow turning it off when it doesn't apply. Refactored light_action to eliminate duplicate code. 2) Lux antiflap Add notion of configurable lux threshold buffer to handle flapping lux sensor. As long as lux sensor reading variations stay within the buffer size no new threshold breaches are detected avoiding resulting actions to flap between on and off. Refactored to gracefully handle NULL items.
Signed-off-by: Mark Theiding mark.theiding@gmail.com