comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 277:46d1012d096a

Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
author heinrichsweikamp
date Mon, 18 Apr 2011 10:23:22 +0200
parents a728b4a1b660
children ce6f861d4e3e
comparison
equal deleted inserted replaced
276:02303915c199 277:46d1012d096a
32 32
33 bcf switch_left ; Left button pressed! 33 bcf switch_left ; Left button pressed!
34 bcf switch_right 34 bcf switch_right
35 35
36 bcf select_bailoutgas ; Clear Flag for Bailout list 36 bcf select_bailoutgas ; Clear Flag for Bailout list
37
38 btfsc premenu ; Pre-Menu? already shown?
39 bra test_switches_divemode0 ; Yes, check if we should jump to menu Entry3
40
41 test_switches_divemode_a:
42
37 bsf premenu ; Set Flag for premenu 43 bsf premenu ; Set Flag for premenu
38 bcf menubit 44 bcf menubit
39 clrf timeout_counter3 ; timeout_divemenu 45 clrf timeout_counter3 ; timeout_divemenu
40 46
41 btfsc FLAG_apnoe_mode ; In Apnoe mode? 47 btfsc FLAG_apnoe_mode ; In Apnoe mode?
42 bra test_switches_divemode1 ; Yes! 48 bra test_switches_divemode1 ; Yes!
43 49
44 test_switches_divemode0:
45 WIN_INVERT .1 50 WIN_INVERT .1
46 DISPLAYTEXT .4 ;Menu? 51 DISPLAYTEXT .4 ;Menu?
47 WIN_INVERT .0 52 WIN_INVERT .0
48 return 53 return
54
55 test_switches_divemode0:
56 btfss menu3_active ; Something to do at Menupos=3?
57 bra test_switches_divemode_a ; No
58 ; Yes! So show menu and jump to this position
59 movlw d'3'
60 movwf menupos
61 bra test_switches_divemode2b ; Show menu with cursor at menupos=3
49 62
50 test_switches_divemode1: 63 test_switches_divemode1:
51 DISPLAYTEXT .141 ;Quit? 64 DISPLAYTEXT .141 ;Quit?
52 return 65 return
53 66
74 bcf divemode ; Clear Divemode flag... 87 bcf divemode ; Clear Divemode flag...
75 bcf premenu ; clear premenu flag 88 bcf premenu ; clear premenu flag
76 return 89 return
77 90
78 test_switches_divemode2a: 91 test_switches_divemode2a:
92 movlw d'1'
93 movwf menupos ; reset cursor in divemode menu
94 test_switches_divemode2b:
79 bsf menubit ; Enter Divemode-Menu! 95 bsf menubit ; Enter Divemode-Menu!
80 bcf premenu ; clear premenu flag 96 bcf premenu ; clear premenu flag
81 call PLED_clear_divemode_menu ; Clear dive mode menu area 97 call PLED_clear_divemode_menu ; Clear dive mode menu area
82 call PLED_divemode_menu_mask_first ; Write Divemode menu1 mask 98 call PLED_divemode_menu_mask_first ; Write Divemode menu1 mask
83 bcf display_set_simulator ; Clear Simulator-Menu flag 99 bcf display_set_simulator ; Clear Simulator-Menu flag
84 movlw d'1'
85 movwf menupos ; reset cursor in divemode menu
86 call PLED_divemenu_cursor ; show cursor 100 call PLED_divemenu_cursor ; show cursor
87 bcf switch_right 101 bcf switch_right
88 bcf switch_left ; Left button pressed! 102 bcf switch_left ; Left button pressed!
89 return 103 return
90 104