comparison src/tft_outputs.asm @ 54:7d626c15b577

some cleanup/changelog
author heinrichsweikamp
date Sun, 29 Sep 2013 19:10:12 +0200
parents 2825f1d2262f
children 448ba265fdae
comparison
equal deleted inserted replaced
53:2825f1d2262f 54:7d626c15b577
747 747
748 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row1 748 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row1
749 lfsr FSR2,buffer 749 lfsr FSR2,buffer
750 movlw .1 750 movlw .1
751 movwf mcp_temp+0 751 movwf mcp_temp+0
752 cpfseq active_gas ;1-5 752 rcall TFT_dyn_gaslist_common
753 bra $+4
754 incf mcp_temp+0,F ; +1
755 movff mcp_temp+0,lo
756 movff mcp_temp+0,PRODL
757 decf PRODL,F ;-1 to have 0-4
758 bsf leftbind
759 output_8 ; Gas number
760 PUTC ":"
761 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
762 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
763 PUTC " " ; Clearing space
764 movlw 0x00
765 movff WREG,buffer+.11 ; limit to 11 chars
766 STRCAT_PRINT ""
767
768 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row2 753 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row2
769 lfsr FSR2,buffer 754 lfsr FSR2,buffer
770 incf mcp_temp+0,F ; +1 755 incf mcp_temp+0,F ; +1
771 movf mcp_temp+0,W ; into W 756 movf mcp_temp+0,W ; into W
772 cpfseq active_gas ;1-5 757 rcall TFT_dyn_gaslist_common
773 bra $+4
774 incf mcp_temp+0,F ; +1
775 movff mcp_temp+0,lo
776 movff mcp_temp+0,PRODL
777 decf PRODL,F ;-1 to have 0-4
778 bsf leftbind
779 output_8 ; Gas number
780 PUTC ":"
781 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
782 PUTC " " ; Clearing space
783 movlw 0x00
784 movff WREG,buffer+.11 ; limit to 11 chars
785 STRCAT_PRINT ""
786
787 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row1 758 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row1
788 lfsr FSR2,buffer 759 lfsr FSR2,buffer
789 incf mcp_temp+0,F ; +1 760 incf mcp_temp+0,F ; +1
790 movf mcp_temp+0,W ; into W 761 movf mcp_temp+0,W ; into W
791 cpfseq active_gas ;1-5 762 rcall TFT_dyn_gaslist_common
792 bra $+4
793 incf mcp_temp+0,F ; +1
794 movff mcp_temp+0,lo
795 movff mcp_temp+0,PRODL
796 decf PRODL,F ;-1 to have 0-4
797 bsf leftbind
798 output_8 ; Gas number
799 PUTC ":"
800 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
801 PUTC " " ; Clearing space
802 movlw 0x00
803 movff WREG,buffer+.11 ; limit to 11 chars
804 STRCAT_PRINT ""
805
806 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row2 763 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row2
807 lfsr FSR2,buffer 764 lfsr FSR2,buffer
808 incf mcp_temp+0,F ; +1 765 incf mcp_temp+0,F ; +1
809 movf mcp_temp+0,W ; into W 766 movf mcp_temp+0,W ; into W
767 rcall TFT_dyn_gaslist_common
768 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
769 call TFT_standard_color
770 return
771
772 TFT_dyn_gaslist_common:
810 cpfseq active_gas ;1-5 773 cpfseq active_gas ;1-5
811 bra $+4 774 bra $+4
812 incf mcp_temp+0,F ; +1 775 incf mcp_temp+0,F ; +1
813 movff mcp_temp+0,lo 776 movff mcp_temp+0,lo
814 movff mcp_temp+0,PRODL 777 movff mcp_temp+0,PRODL
815 decf PRODL,F ;-1 to have 0-4 778 decf PRODL,F ;-1 to have 0-4
816 bsf leftbind 779 bsf leftbind
817 output_8 ; Gas number 780 output_8 ; Gas number
818 bcf leftbind 781 bcf leftbind
819 PUTC ":" 782 PUTC ":"
783 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
820 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 784 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
821 PUTC " " ; Clearing space 785 PUTC " " ; Clearing space
822 movlw 0x00 786 movlw 0x00
823 movff WREG,buffer+.11 ; limit to 11 chars 787 movff WREG,buffer+.11 ; limit to 11 chars
824 STRCAT_PRINT "" 788 STRCAT_PRINT ""
825 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 789 return
826 call TFT_standard_color 790
827 return
828 791
829 global TFT_update_avr_stopwatch ; Update average depth and stopwatch 792 global TFT_update_avr_stopwatch ; Update average depth and stopwatch
830 TFT_update_avr_stopwatch: 793 TFT_update_avr_stopwatch:
831 call TFT_standard_color 794 call TFT_standard_color
832 SAFE_2BYTE_COPY average_divesecs,lo 795 SAFE_2BYTE_COPY average_divesecs,lo