comparison 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
comparison
equal deleted inserted replaced
575:cbdcbbc91877 576:ab2686087bce
204 DISPLAYTEXT .26 ; "Logbook" 204 DISPLAYTEXT .26 ; "Logbook"
205 WIN_INVERT .0 205 WIN_INVERT .0
206 206
207 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page 207 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page
208 208
209 bcf sleepmode ; clear some flags for user input 209 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
210 bcf menubit2
211 bcf menubit3
212 bcf cursor
213 bcf switch_right
214 bcf switch_left
215 clrf timeout_counter2
216 210
217 movlw d'1' ; Set cursor to position 1... 211 movlw d'1' ; Set cursor to position 1...
218 btfsc return_from_profileview ; .. unless we are returning from a detail/profile view 212 btfsc return_from_profileview ; .. unless we are returning from a detail/profile view
219 movf mintemp+1,W ; load last cursor position again 213 movf mintemp+1,W ; load last cursor position again
220 movwf menupos ; and set menupos byte 214 movwf menupos ; and set menupos byte
822 decfsz ignore_digits,F ; counts drawn x-pixels to zero 816 decfsz ignore_digits,F ; counts drawn x-pixels to zero
823 bra profile_display_loop ; Not ready yet 817 bra profile_display_loop ; Not ready yet
824 ; Done. 818 ; Done.
825 profile_display_loop_done: 819 profile_display_loop_done:
826 call PLED_standard_color ; Restore color 820 call PLED_standard_color ; Restore color
827 821 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
828 bcf sleepmode ; clear some flags
829 bcf menubit2
830 bcf menubit3
831 bcf switch_right
832 bcf switch_left
833 clrf timeout_counter2
834 822
835 display_profile_loop: 823 display_profile_loop:
836 call check_switches_logbook 824 call check_switches_logbook
837 btfsc menubit2 ; SET/MENU? 825 btfsc menubit2 ; SET/MENU?
838 bra exit_profileview ; back to list 826 bra exit_profileview ; back to list
994 bsf leftbind 982 bsf leftbind
995 output_16dp d'2' ; e.g. 3.45V 983 output_16dp d'2' ; e.g. 3.45V
996 bcf leftbind 984 bcf leftbind
997 STRCAT_PRINT TXT_VOLT1 985 STRCAT_PRINT TXT_VOLT1
998 986
999 bcf leftbind ; Clear flag
1000 987
1001 ; call I2CREAD2 ; Skip Sampling rate 988 ; call I2CREAD2 ; Skip Sampling rate
1002 989
1003 bcf menubit2 990 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
1004 bcf menubit3
1005 bcf switch_right
1006 bcf switch_left
1007 clrf timeout_counter2
1008 display_profile2_loop: 991 display_profile2_loop:
1009 call check_switches_logbook 992 call check_switches_logbook
1010 btfsc menubit2 ; SET/MENU? 993 btfsc menubit2 ; SET/MENU?
1011 bra exit_profileview ; back to list 994 bra exit_profileview ; back to list
1012 btfsc menubit3 ; ENTER? 995 btfsc menubit3 ; ENTER?