diff src/adc_lightsensor.asm @ 201:82faedf8fd58

lower minimum backlight in eco mode
author heinrichsweikamp
date Thu, 20 Nov 2014 20:32:36 +0100
parents dcd513840c6c
children dd9b167e82dc
line wrap: on
line diff
--- a/src/adc_lightsensor.asm	Wed Nov 12 19:33:15 2014 +0100
+++ b/src/adc_lightsensor.asm	Thu Nov 20 20:32:36 2014 +0100
@@ -265,6 +265,12 @@
     movwf   ambient_light+0         ; avoid ADC clipping
 
 get_ambient_level2:
+    movlw   .10
+    subwf   ambient_light+0,F       ; Subtract 10 (ADC Offset)
+    btfsc   STATUS,N
+    movwf   ambient_light+0         ; avoid clipping
+
+
   	banksel isr_backup              ; Back to Bank0 ISR data
 	movff	opt_brightness,isr1_temp