comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 395:0e0cf4701c17

Merge with 64kByte Logbook
author JeanDo
date Thu, 23 Jun 2011 01:37:59 +0200
parents 88660a400338
children 47b1135cbff3
comparison
equal deleted inserted replaced
369:93c0cb14b0d2 395:0e0cf4701c17
129 movlw d'5' ; Number of entries for this menu+1 = 5 129 movlw d'5' ; Number of entries for this menu+1 = 5
130 btfsc display_set_active ; De/Activate gases underwater menu is visible? 130 btfsc display_set_active ; De/Activate gases underwater menu is visible?
131 movlw d'7' ; Number of entries for this menu+1 = 7 131 movlw d'7' ; Number of entries for this menu+1 = 7
132 btfsc display_set_xgas ; Are we in the Gas6 menu? 132 btfsc display_set_xgas ; Are we in the Gas6 menu?
133 movlw d'7' ; Number of entries for this menu+1 = 7 133 movlw d'7' ; Number of entries for this menu+1 = 7
134 btfsc display_set_simulator ; Are we in the simulator menu?
135 movlw d'7' ; Number of entries for this menu+1 = 7
134 cpfseq menupos ; =limit? 136 cpfseq menupos ; =limit?
135 bra test_switches_divemode_menu1; No! 137 bra test_switches_divemode_menu1; No!
136 movlw d'1' ; Yes, reset to position 1! 138 movlw d'1' ; Yes, reset to position 1!
137 movwf menupos 139 movwf menupos
138 140
346 bra divemode_menu_simulator_m1 ; Adjust -1m 348 bra divemode_menu_simulator_m1 ; Adjust -1m
347 dcfsnz menupos,F 349 dcfsnz menupos,F
348 bra divemode_menu_simulator_p10 ; Adjust +10m 350 bra divemode_menu_simulator_p10 ; Adjust +10m
349 dcfsnz menupos,F 351 dcfsnz menupos,F
350 bra divemode_menu_simulator_m10 ; Adjust -10m 352 bra divemode_menu_simulator_m10 ; Adjust -10m
353 dcfsnz menupos,F
354 bra divemode_menu_simulator_quit; Adjust to zero m
351 bra timeout_divemenu2 ; quit underwater menu! 355 bra timeout_divemenu2 ; quit underwater menu!
352 356
353 divemode_menu_simulator_common: 357 divemode_menu_simulator_common:
354 call PLED_divemode_simulator_mask ; Redraw Simualtor mask 358 call PLED_divemode_simulator_mask ; Redraw Simualtor mask
355 359
364 movlw LOW d'14000' 368 movlw LOW d'14000'
365 movwf sim_pressure+0 369 movwf sim_pressure+0
366 movlw HIGH d'14000' 370 movlw HIGH d'14000'
367 movwf sim_pressure+1 371 movwf sim_pressure+1
368 return 372 return
369
370 divemode_menu_simulator_common2: 373 divemode_menu_simulator_common2:
371 movlw LOW d'1000' ; Compare to 1bar == 0m == 1000 mbar. 374 movlw LOW d'1000' ; Compare to 1bar == 0m == 1000 mbar.
372 subwf sim_pressure+0,W 375 subwf sim_pressure+0,W
373 movlw HIGH d'1000' 376 movlw HIGH d'1000'
374 subwfb sim_pressure+1,W 377 subwfb sim_pressure+1,W
398 addwfc sim_pressure+1,F 401 addwfc sim_pressure+1,F
399 402
400 movlw d'4' 403 movlw d'4'
401 movwf menupos ; reset cursor 404 movwf menupos ; reset cursor
402 bra divemode_menu_simulator_common 405 bra divemode_menu_simulator_common
406
407 divemode_menu_simulator_quit:
408 movlw LOW d'1000'
409 movwf sim_pressure+0
410 movlw HIGH d'1000'
411 movwf sim_pressure+1
412 bra timeout_divemenu2 ; quit menu
403 413
404 divemode_menu_simulator_p1: 414 divemode_menu_simulator_p1:
405 movlw d'100' 415 movlw d'100'
406 addwf sim_pressure+0,F 416 addwf sim_pressure+0,F
407 movlw d'0' 417 movlw d'0'