comparison src/tft_outputs.asm @ 386:3c55627d5f8f

some cleanups, jump to 1.90 stable
author heinrichsweikamp
date Wed, 07 Oct 2015 14:46:39 +0200
parents ca32cf2435c6
children 642e927520eb
comparison
equal deleted inserted replaced
385:b075fa71b659 386:3c55627d5f8f
590 movwf xC+0 590 movwf xC+0
591 movlw .6 591 movlw .6
592 movwf xC+1 592 movwf xC+1
593 movlw .1 593 movlw .1
594 movwf xC+2 594 movwf xC+2
595 movlw .0 595 clrf xC+3
596 movwf xC+3
597 ; check if velocity is below the treshold level 596 ; check if velocity is below the treshold level
598 bcf STATUS,C 597 bcf STATUS,C
599 movlw velocity_display_threshold_2 598 movlw velocity_display_threshold_2
600 subwf divA+0,W 599 subwf divA+0,W
601 btfss STATUS,C 600 btfss STATUS,C
645 movwf xC+0 644 movwf xC+0
646 movlw .2 645 movlw .2
647 movwf xC+1 646 movwf xC+1
648 movlw .10 647 movlw .10
649 movwf xC+2 648 movwf xC+2
650 movlw .0 649 clrf xC+3
651 movwf xC+3
652 ; check if current depth > segment limit 650 ; check if current depth > segment limit
653 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit 651 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit
654 btfss neg_flag ; depth lower than segment limit? sLimit>depth? 652 btfss neg_flag ; depth lower than segment limit? sLimit>depth?
655 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment 653 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment
656 654
668 movwf xC+0 666 movwf xC+0
669 movlw .2 667 movlw .2
670 movwf xC+1 668 movwf xC+1
671 movlw .12 669 movlw .12
672 movwf xC+2 670 movwf xC+2
673 movlw .0 671 clrf xC+3
674 movwf xC+3
675 ; check if current depth > segment limit 672 ; check if current depth > segment limit
676 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit 673 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit
677 btfss neg_flag ; depth lower than segment limit? sLimit>depth? 674 btfss neg_flag ; depth lower than segment limit? sLimit>depth?
678 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment 675 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment
679 676
760 movwf xC+0 757 movwf xC+0
761 movlw .3 758 movlw .3
762 movwf xC+1 759 movwf xC+1
763 movlw .11 760 movlw .11
764 movwf xC+2 761 movwf xC+2
765 movlw .0 762 clrf xC+3
766 movwf xC+3
767 ; check if current depth > segment limit 763 ; check if current depth > segment limit
768 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit 764 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit
769 btfss neg_flag ; depth lower than segment limit? sLimit>depth? 765 btfss neg_flag ; depth lower than segment limit? sLimit>depth?
770 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment 766 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment
771 767
804 ; graphical position helpers 800 ; graphical position helpers
805 movlw .5 801 movlw .5
806 movwf xC+0 802 movwf xC+0
807 movlw .3 803 movlw .3
808 movwf xC+1 804 movwf xC+1
809 movlw .0 805 clrf xC+2
810 movwf xC+2
811 movlw .6 806 movlw .6
812 movwf xC+3 807 movwf xC+3
813 ; check if current depth > segment limit 808 ; check if current depth > segment limit
814 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit 809 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit
815 btfss neg_flag ; depth lower than segment limit? sLimit>depth? 810 btfss neg_flag ; depth lower than segment limit? sLimit>depth?
852 movwf xC+0 847 movwf xC+0
853 movlw .5 848 movlw .5
854 movwf xC+1 849 movwf xC+1
855 movlw .2 850 movlw .2
856 movwf xC+2 851 movwf xC+2
857 movlw .0 852 clrf xC+3
858 movwf xC+3
859 ; check if current depth > segment limit 853 ; check if current depth > segment limit
860 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit 854 call subU16 ; sub_c = sub_a - sub_b; depth - sLimit
861 btfss neg_flag ; depth lower than segment limit? sLimit>depth? 855 btfss neg_flag ; depth lower than segment limit? sLimit>depth?
862 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment 856 bra TFT_velocity_check ; no, depth>=sLimit, do the check for this segment
863 857
873 movwf xC+0 867 movwf xC+0
874 movlw .6 868 movlw .6
875 movwf xC+1 869 movwf xC+1
876 movlw .1 870 movlw .1
877 movwf xC+2 871 movwf xC+2
878 movlw .0 872 clrf xC+3
879 movwf xC+3
880 ;bra TFT_velocity_check ; depth < 20ft / 6m 873 ;bra TFT_velocity_check ; depth < 20ft / 6m
881 874
882 TFT_velocity_check: 875 TFT_velocity_check:
883 ; move current ascent rate to lo 876 ; move current ascent rate to lo
884 clrf hi 877 clrf hi
919 ; initialize the multiplier/offset values for the graphical bar 912 ; initialize the multiplier/offset values for the graphical bar
920 movlw .5 913 movlw .5
921 movwf xC+0 914 movwf xC+0
922 movlw .3 915 movlw .3
923 movwf xC+1 916 movwf xC+1
924 movlw .0 917 clrf xC+2
925 movwf xC+2
926 movlw .6 918 movlw .6
927 movwf xC+3 919 movwf xC+3
928 920
929 bcf STATUS,C 921 bcf STATUS,C
930 movlw velocity_display_threshold_1 ; lowest threshold for display vertical velocity 922 movlw velocity_display_threshold_1 ; lowest threshold for display vertical velocity
2547 TFT_gaslist_surfmode: ; Displays Gas List 2539 TFT_gaslist_surfmode: ; Displays Gas List
2548 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2540 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2549 extern gaslist_strcat_gas_mod 2541 extern gaslist_strcat_gas_mod
2550 ;Gas 1 2542 ;Gas 1
2551 WIN_SMALL surf_gaslist_column,surf_gaslist_row 2543 WIN_SMALL surf_gaslist_column,surf_gaslist_row
2552 movlw .0 2544 clrf PRODL
2553 movwf PRODL
2554 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2545 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2555 STRCAT_PRINT "" 2546 STRCAT_PRINT ""
2556 ;Gas 2 2547 ;Gas 2
2557 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1) 2548 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1)
2558 movlw .1 2549 movlw .1