diff code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 576:ab2686087bce

faster font display, code cleaning
author heinrichsweikamp
date Sun, 22 Apr 2012 14:38:10 +0200
parents cbdcbbc91877
children e3ffc6d62a63
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Sat Apr 21 15:08:09 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Sun Apr 22 14:38:10 2012 +0200
@@ -206,13 +206,7 @@
 	
 	DISPLAYTEXT .11							; Displays "Exit" in the last row on the current page
 
-	bcf			sleepmode					; clear some flags for user input
-	bcf			menubit2
-	bcf			menubit3
-	bcf			cursor
-	bcf			switch_right
-	bcf			switch_left
-	clrf		timeout_counter2
+	call		menu_pre_loop_common		; Clear some menu flags, timeout and switches
 
 	movlw		d'1'						; Set cursor to position 1...
 	btfsc		return_from_profileview		; .. unless we are returning from a detail/profile view
@@ -824,13 +818,7 @@
 ; Done.
 profile_display_loop_done:
 	call		PLED_standard_color			; Restore color
-
-	bcf			sleepmode					; clear some flags
-	bcf			menubit2
-	bcf			menubit3
-	bcf			switch_right
-	bcf			switch_left
-	clrf		timeout_counter2
+	call		menu_pre_loop_common		; Clear some menu flags, timeout and switches
 
 display_profile_loop:
 	call		check_switches_logbook
@@ -996,15 +984,10 @@
 	bcf		leftbind
 	STRCAT_PRINT  TXT_VOLT1
 
-	bcf			leftbind					; Clear flag
 
 ;	call		I2CREAD2					; Skip Sampling rate
 
-	bcf			menubit2
-	bcf			menubit3
-	bcf			switch_right
-	bcf			switch_left
-	clrf		timeout_counter2
+	call		menu_pre_loop_common		; Clear some menu flags, timeout and switches
 display_profile2_loop:
 	call		check_switches_logbook
 	btfsc		menubit2					; SET/MENU?