Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 111:ed7826c740a0
1.74beta rc1
author | heinrichsweikamp |
---|---|
date | Wed, 22 Dec 2010 09:37:24 +0100 |
parents | 6e635bf5b7a7 |
children | 9500f431248a |
comparison
equal
deleted
inserted
replaced
110:8aa8acada0fd | 111:ed7826c740a0 |
---|---|
85 call PLED_divemenu_cursor ; show cursor | 85 call PLED_divemenu_cursor ; show cursor |
86 bcf switch_right | 86 bcf switch_right |
87 bcf switch_left ; Left button pressed! | 87 bcf switch_left ; Left button pressed! |
88 return | 88 return |
89 | 89 |
90 reset_stopwatch: | |
91 btfsc lock_stopwatch_reset ; Reset locked? | |
92 return ; Yes, do not reset (now)... | |
93 ; Maker Set, also reset average Depth.... | |
94 clrf average_depth_hold+0 | |
95 clrf average_depth_hold+1 | |
96 clrf average_depth_hold+2 | |
97 clrf average_depth_hold+3 ; Clear average depth register | |
98 movlw d'2' | |
99 movwf average_divesecs+0 | |
100 clrf average_divesecs+1 | |
101 call calc_average_depth | |
102 return | |
103 | |
104 test_switches_divemode_menu: | 90 test_switches_divemode_menu: |
105 btfsc switch_left | 91 btfsc switch_left |
106 bra test_switches_divemode_menu3 | 92 bra test_switches_divemode_menu3 |
107 btfss switch_right | 93 btfss switch_right |
108 return | 94 return |
195 movwf AlarmType ; Copy to Alarm Register | 181 movwf AlarmType ; Copy to Alarm Register |
196 bsf event_occured ; Set Event Flag | 182 bsf event_occured ; Set Event Flag |
197 bra timeout_divemenu2 ; quit menu! | 183 bra timeout_divemenu2 ; quit menu! |
198 | 184 |
199 toggle_stopwatch: | 185 toggle_stopwatch: |
200 btg stopwatch_active ; Toggle Flag | 186 bsf reset_average_depth ; Average Depth will be resetted in divemode.asm |
201 | |
202 btfss stopwatch_active ; Show Stopwatch? | |
203 bra toggle_stopwatch2 ; No, remove outputs | |
204 | |
205 clrf average_depth_hold+0 | |
206 clrf average_depth_hold+1 | |
207 clrf average_depth_hold+2 | |
208 clrf average_depth_hold+3 ; Clear average depth register | |
209 movlw d'3' | |
210 movwf average_divesecs+0 | |
211 clrf average_divesecs+1 | |
212 call calc_average_depth | |
213 bra timeout_divemenu2 ; quit menu! | |
214 | |
215 toggle_stopwatch2: | |
216 call PLED_clear_customview_divemode ; Remove Stopwatch Outputs | |
217 bra timeout_divemenu2 ; quit menu! | 187 bra timeout_divemenu2 ; quit menu! |
218 | 188 |
219 divemode_toggle_brightness: | 189 divemode_toggle_brightness: |
220 read_int_eeprom d'90' ; Brightness offset? (Dim>0, Normal = 0) | 190 read_int_eeprom d'90' ; Brightness offset? (Dim>0, Normal = 0) |
221 tstfsz EEDATA ; Was dimmed? | 191 tstfsz EEDATA ; Was dimmed? |
679 bcf display_set_xgas | 649 bcf display_set_xgas |
680 bcf display_set_setpoint | 650 bcf display_set_setpoint |
681 bcf display_set_simulator | 651 bcf display_set_simulator |
682 bcf switch_left ; and debounce switches | 652 bcf switch_left ; and debounce switches |
683 bcf switch_right | 653 bcf switch_right |
684 bsf lock_stopwatch_reset ; Lock the stopwatch reset for at least one second (Cleared in "calc_average_depth:") | |
685 return | 654 return |
686 | 655 |
687 timeout_divemenu3: | 656 timeout_divemenu3: |
688 movff char_O_deco_status,deco_status ; | 657 movff char_O_deco_status,deco_status ; |
689 tstfsz deco_status ; deco_status=0 if decompression calculation done | 658 tstfsz deco_status ; deco_status=0 if decompression calculation done |