comparison src/tft_outputs.asm @ 131:35b9da423de6

NEW: Update warnings every second NEW: Show "Stop" in front of Safety Stop
author heinrichsweikamp
date Fri, 04 Jul 2014 12:51:20 +0200
parents c935f7fbd39c
children 4574aed5cd4c
comparison
equal deleted inserted replaced
130:c935f7fbd39c 131:35b9da423de6
725 ; bra TFT_display_deko2 ; Yes 725 ; bra TFT_display_deko2 ; Yes
726 ; ; No 726 ; ; No
727 ; bra TFT_display_ndl_mask2 ; Clear gradient factor 727 ; bra TFT_display_ndl_mask2 ; Clear gradient factor
728 ; 728 ;
729 729
730 global TFT_clear_safety_stop
731 TFT_clear_safety_stop:
732 WIN_BOX_BLACK safetystop_text_row, ndl_text_row-.4, safetystop_text_column, .159 ; top, bottom, left, right
733 return
734
730 global TFT_show_safety_stop 735 global TFT_show_safety_stop
731 TFT_show_safety_stop: 736 TFT_show_safety_stop:
732 btfsc divemode_menu ; Is the dive mode menu shown?
733 return ; Yes, return
734
735 tstfsz safety_stop_countdown ; Countdown at zero? 737 tstfsz safety_stop_countdown ; Countdown at zero?
736 bra TFT_show_safety_stop2 ; No, show stop 738 bra TFT_show_safety_stop2 ; No, show stop
737 739
738 bcf show_safety_stop ; Clear flag 740 bcf show_safety_stop ; Clear flag
739 741
740 btfsc safety_stop_active ; Displayed? 742 btfss safety_stop_active ; Displayed?
741 rcall TFT_clear_decoarea ; Yes, Clear stop 743 return ; No
742 bcf safety_stop_active ; Clear flag 744 bcf safety_stop_active ; Clear flag
743 rcall TFT_display_ndl_mask ; Show NDL again 745 btfsc divemode_menu ; Is the dive mode menu shown?
744 bra TFT_display_ndl ; (And return) 746 return ; Yes, return
747 rcall TFT_clear_safety_stop ; Yes, Clear stop
748 return
745 749
746 TFT_show_safety_stop2: 750 TFT_show_safety_stop2:
747 bsf safety_stop_active ; Set flag 751 bsf safety_stop_active ; Set flag
752 decf safety_stop_countdown,F ; Reduce countdown
753
754 btfsc divemode_menu ; Is the dive mode menu shown?
755 return ; Yes, return
756 btfsc menuview
757 bra TFT_show_safety_stop3 ; No room when menuview=1...
758
759 rcall TFT_divemask_color
760 WIN_STD safetystop_text_column,safetystop_text_row
761 STRCPY_TEXT_PRINT tDiveSafetyStop
762 TFT_show_safety_stop3:
748 rcall TFT_attention_color ; show in yellow 763 rcall TFT_attention_color ; show in yellow
749 WIN_MEDIUM safetystop_column,safetystop_row 764 WIN_MEDIUM safetystop_column,safetystop_row
750 decf safety_stop_countdown,F ; Reduce countdown 765 lfsr FSR2,buffer
751 movff safety_stop_countdown,lo 766 movff safety_stop_countdown,lo
752 clrf hi 767 clrf hi
753 call convert_time ; converts hi:lo in seconds to mins (hi) and seconds (lo) 768 call convert_time ; converts hi:lo in seconds to mins (hi) and seconds (lo)
754 movf hi,W 769 movf hi,W
755 movff lo,hi 770 movff lo,hi
756 movwf lo ; exchange lo and hi 771 movwf lo ; exchange lo and hi
757 output_99 772 bsf leftbind
773 output_8
774 bcf leftbind
758 PUTC ':' 775 PUTC ':'
759 movff hi,lo 776 movff hi,lo
760 output_99x 777 output_99x
761 STRCAT_PRINT "" 778 STRCAT_PRINT ""
762 WIN_FONT FT_SMALL 779 WIN_FONT FT_SMALL