comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 64:e8756eba54ee

1.71beta - more deco
author heinrichsweikamp
date Sat, 02 Oct 2010 23:34:08 +0200
parents 943dc3336f48
children 6aee3a07f370
comparison
equal deleted inserted replaced
63:fee7c62b4de1 64:e8756eba54ee
400 bcf display_see_l_tissue ; Clear Flag 400 bcf display_see_l_tissue ; Clear Flag
401 bra timeout_divemenu2 ; quit menu! 401 bra timeout_divemenu2 ; quit menu!
402 402
403 divemenu_see_decoplan: 403 divemenu_see_decoplan:
404 bsf display_see_deco ; set flag 404 bsf display_see_deco ; set flag
405 call PLED_clear_divemode_menu ; Clear Menu
405 406
406 read_int_eeprom d'34' 407 read_int_eeprom d'34'
407 movlw d'3' 408 movlw d'3'
408 cpfsgt EEDATA ; in multi-gf mode? Z16 GF OC=4 and Z16 GF CC=5 409 cpfsgt EEDATA ; in multi-gf mode? Z16 GF OC=4 and Z16 GF CC=5
409 bra divemenu_see_decoplan1 ; No! 410 bra divemenu_see_decoplan1 ; No!
410 411
411 bra divemenu_see_decoplan1 ; Show normal plan! ToDo: MultiGF Plan....
412
413 bsf multi_gf_display ; Yes, display the multi-gf table screen 412 bsf multi_gf_display ; Yes, display the multi-gf table screen
414 call PLED_ClearScreen ; clean up OLED 413 bcf last_ceiling_gf_shown ; Clear flag
415 call PLED_MultiGF_deco_mask
416 414
417 movff char_O_deco_status,deco_status ; 415 movff char_O_deco_status,deco_status ;
418 tstfsz deco_status ; deco_status=0 if decompression calculation done 416 tstfsz deco_status ; deco_status=0 if decompression calculation done
419 return ; calculation not yet finished! 417 return ; calculation not yet finished!
420 418
421 call PLED_MultiGF_deco_all ; Display the new screen 419 call PLED_decoplan_gf_page1 ; Display the new screen
422 return 420 return
423 421
424 divemenu_see_decoplan1: 422 divemenu_see_decoplan1:
425 call PLED_clear_divemode_menu ; Clear Menu
426 423
427 movff char_O_deco_status,deco_status ; 424 movff char_O_deco_status,deco_status ;
428 tstfsz deco_status ; deco_status=0 if decompression calculation done 425 tstfsz deco_status ; deco_status=0 if decompression calculation done
429 return ; calculation not yet finished! 426 return ; calculation not yet finished!
430 427
431 call PLED_decoplan ; display the Decoplan 428 call PLED_decoplan ; display the Decoplan
432 return 429 return
433 430
434 divemenu_see_decoplan2: 431 divemenu_see_decoplan2:
432 btfsc multi_gf_display ; Next Page in Multi-GF Screen?
433 bra divemenu_see_decoplan2_nextgf ; Yes!
434 ; No, remove outputs!
435 divemenu_see_decoplan2_0:
435 bcf display_see_deco ; clear flag 436 bcf display_see_deco ; clear flag
436 bra timeout_divemenu2 ; quit menu! 437 bra timeout_divemenu2 ; quit menu!
438
439 divemenu_see_decoplan2_nextgf:
440 incf temp8,F
441 btfsc last_ceiling_gf_shown ; last ceiling shown?
442 bra divemenu_see_decoplan2_0 ; All done, clear and return
443
444 clrf timeout_counter3 ; Clear timeout Divemode menu
445 bra timeout_divemenu3 ; Display next page
446
447
437 448
438 divemenu_set_xgas2: 449 divemenu_set_xgas2:
439 dcfsnz menupos,F 450 dcfsnz menupos,F
440 bra divemenu_set_xgas2_exit ; Use the gas6 configured and exit 451 bra divemenu_set_xgas2_exit ; Use the gas6 configured and exit
441 dcfsnz menupos,F 452 dcfsnz menupos,F
707 btfss multi_gf_display ; Was the Multi-GF Table displayed? 718 btfss multi_gf_display ; Was the Multi-GF Table displayed?
708 bra timeout_divemenu2a ; No, normal OLED rebuild 719 bra timeout_divemenu2a ; No, normal OLED rebuild
709 720
710 ; Restore some outputs 721 ; Restore some outputs
711 bcf multi_gf_display ; Do not display the multi-gf table screen 722 bcf multi_gf_display ; Do not display the multi-gf table screen
712 call PLED_ClearScreen ; Yes, clean up OLED first
713 call PLED_temp_divemode ; Displays temperature
714 call PLED_max_pressure ; Max. Depth
715 btfsc dekostop_active 723 btfsc dekostop_active
716 call PLED_display_deko_mask ; clear nostop time, display decodata 724 call PLED_display_deko_mask ; clear nostop time, display decodata
717 btfss dekostop_active 725 btfss dekostop_active
718 call PLED_display_ndl_mask ; Clear deco data, display nostop time 726 call PLED_display_ndl_mask ; Clear deco data, display nostop time
719 727
736 bcf switch_left ; and debounce switches 744 bcf switch_left ; and debounce switches
737 bcf switch_right 745 bcf switch_right
738 return 746 return
739 747
740 timeout_divemenu3: 748 timeout_divemenu3:
741 ; call PLED_MultiGF_deco_mask 749 movff char_O_deco_status,deco_status ;
742 750 tstfsz deco_status ; deco_status=0 if decompression calculation done
743 movff char_O_deco_status,deco_status ;
744 tstfsz deco_status ; deco_status=0 if decompression calculation done
745 bra timeout_divemenu1 ; No, skip updating the decoplan 751 bra timeout_divemenu1 ; No, skip updating the decoplan
746 752 call PLED_decoplan_gf_page_current ; Re-Draw Current page of GF Decoplan
747 call PLED_MultiGF_deco_all ; Display the new screen
748 bra timeout_divemenu1 ; Check timeout 753 bra timeout_divemenu1 ; Check timeout
749 754
750 timeout_divemenu6: 755 timeout_divemenu6:
751 ; Update Simulator Mask 756 ; Update Simulator Mask
752 call PLED_divemode_simulator_mask; Show mask 757 call PLED_divemode_simulator_mask; Show mask