diff src/adc_lightsensor.asm @ 451:66049b6f2c0b

speedup analog presses
author heinrichsweikamp
date Thu, 01 Sep 2016 13:24:17 +0200
parents aadfe9f2edaf
children 025a0ce21f8b
line wrap: on
line diff
--- a/src/adc_lightsensor.asm	Wed Aug 31 14:48:10 2016 +0200
+++ b/src/adc_lightsensor.asm	Thu Sep 01 13:24:17 2016 +0200
@@ -523,7 +523,6 @@
 
     global	get_analog_switches
 get_analog_switches:              ; starts ADC and waits until finished
-    return
     btfsc   analog_switches
     bra	    get_analog_switches2
     ; no analog switches
@@ -566,7 +565,11 @@
 get_analog_sw_done:
     movlw	b'10001101'	    ; Restore to right justified
     movwf	ADCON2
+    btfsc	analog_sw1_pressed
+    return
+    btfsc	analog_sw2_pressed
+    return
+    setf	TMR1H		; No button pressed, enhance timer1 to overflow quickly
     return
 
-
 	END
\ No newline at end of file