comparison code_part1/OSTC_code_asm_part1/outputs.asm @ 778:43ef5a003df7

NEW: Show End-of-Dive time together with clock during deco
author heinrichsweikamp
date Wed, 07 May 2014 14:58:03 +0200
parents 5d6da9ddde27
children d2b7d78b0019
comparison
equal deleted inserted replaced
777:b92ee354baae 778:43ef5a003df7
829 return 829 return
830 830
831 831
832 DISP_diveclock: 832 DISP_diveclock:
833 call DISP_divemask_color ; Set Color for Divemode mask 833 call DISP_divemask_color ; Set Color for Divemode mask
834 DISPLAYTEXT d'255' ; Clock 834 DISPLAYTEXT d'255' ; Time:
835 call DISP_standard_color 835 call DISP_standard_color
836 836
837 DISP_diveclock2: 837 DISP_diveclock2:
838 WIN_TOP .192 838 WIN_TOP .192
839 WIN_LEFT .123 839 WIN_LEFT .123
845 output_99x 845 output_99x
846 PUTC ':' 846 PUTC ':'
847 movff mins,lo 847 movff mins,lo
848 output_99x 848 output_99x
849 call word_processor 849 call word_processor
850 return 850
851 DISP_diveclock3: ; Update end of divetime only
852 WIN_TOP .216
853 WIN_LEFT .116
854 WIN_FONT FT_SMALL
855 WIN_INVERT .0
856 call DISP_standard_color
857
858 btfss dekostop_active ; Already in nodeco mode ?
859 bra DISP_diveclock4 ; No, overwrite with some spaces
860
861 STRCPY 0x94 ; "End of dive" icon
862 movff hours,WREG
863 mullw .60
864 movf mins,W
865 addwf PRODL
866 movlw .0
867 addwfc PRODH
868 movff PRODL, lo
869 movff PRODH, hi
870
871 ; Add TTS
872 movff int_O_ascenttime+0,WREG ; TTS
873 addwf lo,F
874 movff int_O_ascenttime+1,WREG ; TTS is 16bits
875 addwfc hi,F
876
877 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
878 movf hi,W
879 movff lo,hi
880 movwf lo ; exchange lo and hi
881 output_99x
882 PUTC ':'
883 movff hi,lo
884 output_99x
885 STRCAT_PRINT ""
886 return
887
888 DISP_diveclock4:
889 STRCPY_PRINT " "
890 return
851 891
852 DISP_clock: 892 DISP_clock:
853 ostc_debug 'c' 893 ostc_debug 'c'
854 WIN_TOP .50 894 WIN_TOP .50
855 WIN_LEFT .1 895 WIN_LEFT .1