From: Jan "Yenya" Kasprzak Date: Thu, 13 Jun 2013 19:14:30 +0000 (+0200) Subject: ambient.c: detect drop of ambient light X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=bike-lights.git;a=commitdiff_plain;h=1dcbf67055a7a51031a57db46d899ade790b2d30;hp=1dcbf67055a7a51031a57db46d899ade790b2d30 ambient.c: detect drop of ambient light Measure also longer-term running average of ambient light values, and log instead of minima and maxima of adc readings the diffrence between this longer-term average and normal avereage (ambient_val). This is so that we would be able to switch the front light on when entering a darkish area from the bright sun. ---