comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 575:cbdcbbc91877

some code cleaning
author heinrichsweikamp
date Sat, 21 Apr 2012 15:08:09 +0200
parents 56da3e962e98
children ab2686087bce
comparison
equal deleted inserted replaced
574:101fec6a6137 575:cbdcbbc91877
231 231
232 btfsc menubit2 ; ENTER? 232 btfsc menubit2 ; ENTER?
233 bra display_profile_or_exit ; view details/profile or exit logbook 233 bra display_profile_or_exit ; view details/profile or exit logbook
234 234
235 btfsc onesecupdate 235 btfsc onesecupdate
236 call timeout_surfmode ; Timeout 236 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag
237
238 btfsc onesecupdate
239 call set_dive_modes ; Check, if divemode must be entered
240 237
241 bcf onesecupdate ; one second update 238 bcf onesecupdate ; one second update
242 239
243 btfsc sleepmode ; Timeout? 240 btfsc sleepmode ; Timeout?
244 goto menu ; Yes 241 goto menu ; Yes
245
246 btfsc divemode
247 goto restart ; Enter Divemode if required
248 242
249 goto menu_logbook_loop ; Wait for something to do 243 goto menu_logbook_loop ; Wait for something to do
250 244
251 display_profile_or_exit: 245 display_profile_or_exit:
252 bcf menubit2 ; debounce 246 bcf menubit2 ; debounce
842 call check_switches_logbook 836 call check_switches_logbook
843 btfsc menubit2 ; SET/MENU? 837 btfsc menubit2 ; SET/MENU?
844 bra exit_profileview ; back to list 838 bra exit_profileview ; back to list
845 btfsc menubit3 ; ENTER? 839 btfsc menubit3 ; ENTER?
846 bra profileview_page2 ; Switch to Page2 of profile view 840 bra profileview_page2 ; Switch to Page2 of profile view
841
847 btfsc onesecupdate 842 btfsc onesecupdate
848 call timeout_surfmode ; timeout 843 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag
849 btfsc onesecupdate
850 call set_dive_modes ; check, if divemode must be entered
851 bcf onesecupdate ; one second update 844 bcf onesecupdate ; one second update
845
852 btfsc sleepmode ; Timeout? 846 btfsc sleepmode ; Timeout?
853 bra exit_profileview ; back to list 847 bra exit_profileview ; back to list
854 btfsc divemode
855 goto restart ; Enter Divemode if required
856 bra display_profile_loop ; wait for something to do 848 bra display_profile_loop ; wait for something to do
857 849
858 ;============================================================================= 850 ;=============================================================================
859 profile_display_color: 851 profile_display_color:
860 movff average_depth_hold_total+3,active_gas ; Restore gas color. 852 movff average_depth_hold_total+3,active_gas ; Restore gas color.
1018 btfsc menubit2 ; SET/MENU? 1010 btfsc menubit2 ; SET/MENU?
1019 bra exit_profileview ; back to list 1011 bra exit_profileview ; back to list
1020 btfsc menubit3 ; ENTER? 1012 btfsc menubit3 ; ENTER?
1021 bra profileview_page3 ; Switch to Page3 of profile view 1013 bra profileview_page3 ; Switch to Page3 of profile view
1022 btfsc onesecupdate 1014 btfsc onesecupdate
1023 call timeout_surfmode ; timeout 1015 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag
1024 btfsc onesecupdate
1025 call set_dive_modes ; check, if divemode must be entered
1026 bcf onesecupdate ; one second update 1016 bcf onesecupdate ; one second update
1027 btfsc sleepmode ; Timeout? 1017 btfsc sleepmode ; Timeout?
1028 bra exit_profileview ; back to list 1018 bra exit_profileview ; back to list
1029 btfsc divemode
1030 goto restart ; Enter Divemode if required
1031 bra display_profile2_loop ; wait for something to do 1019 bra display_profile2_loop ; wait for something to do
1032 1020
1033 profileview_page3: 1021 profileview_page3:
1034 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right 1022 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right
1035 1023
1146 btfsc menubit2 ; SET/MENU? 1134 btfsc menubit2 ; SET/MENU?
1147 bra exit_profileview ; back to list 1135 bra exit_profileview ; back to list
1148 btfsc menubit3 ; ENTER? 1136 btfsc menubit3 ; ENTER?
1149 bra exit_profileview ; back to list 1137 bra exit_profileview ; back to list
1150 btfsc onesecupdate 1138 btfsc onesecupdate
1151 call timeout_surfmode ; timeout 1139 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag
1152 btfsc onesecupdate
1153 call set_dive_modes ; check, if divemode must be entered
1154 bcf onesecupdate ; one second update 1140 bcf onesecupdate ; one second update
1155 btfsc sleepmode ; Timeout? 1141 btfsc sleepmode ; Timeout?
1156 bra exit_profileview ; back to list 1142 bra exit_profileview ; back to list
1157 btfsc divemode
1158 goto restart ; Enter Divemode if required
1159 bra display_profile3_loop ; wait for something to do 1143 bra display_profile3_loop ; wait for something to do
1160 1144
1161 ;============================================================================= 1145 ;=============================================================================
1162 ; Draw a vertical line between xC+1 and xC+0, at current X position. 1146 ; Draw a vertical line between xC+1 and xC+0, at current X position.
1163 ; 1147 ;