comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 497:06db5dd9149f

show numeric _and_ graphic velocity, move desat, nofly and interval into isr
author heinrichsweikamp
date Wed, 09 Nov 2011 16:17:11 +0100
parents 19b9e19ea4da
children 4c7f7807b250
comparison
equal deleted inserted replaced
496:97d3f5537b43 497:06db5dd9149f
608 movlw d'6' 608 movlw d'6'
609 movwf temp1 609 movwf temp1
610 bcf timeout_display ; Clear flag 610 bcf timeout_display ; Clear flag
611 bra PLED_display_clear_common_y1 611 bra PLED_display_clear_common_y1
612 612
613 PLED_display_velocity_graphical_clear:
614 WIN_BOX_BLACK .20, .90, .65, .75 ; Clear graphic display
615 bra PLED_display_velocity ; Continue with normal output
616
613 PLED_display_velocity_graphical: 617 PLED_display_velocity_graphical:
614 btfss neg_flag 618 btfss neg_flag
615 bra PLED_display_velocity_clear ; No display for descend speed, clear instead 619 bra PLED_display_velocity_graphical_clear
616 bsf pled_velocity_display 620 bsf pled_velocity_display
617 ; divA+0 holding the ascend speed in m/min 621 ; divA+0 holding the ascend speed in m/min
618 movff divA+0,hi ; Copy 622 movff divA+0,hi ; Copy
619 WIN_BOX_BLACK .20, .90, .65, .75 ; Clear graphic display 623 WIN_BOX_BLACK .20, .90, .65, .75 ; Clear graphic display
620 GETCUSTOM8 d'36' ; Divemode mask 624 GETCUSTOM8 d'36' ; Divemode mask
639 movff xC+0,xB+0 ; Step size 643 movff xC+0,xB+0 ; Step size
640 clrf xB+1 644 clrf xB+1
641 call div16x16 ;xA/xB=xC with xA as remainder 645 call div16x16 ;xA/xB=xC with xA as remainder
642 ; xC+0 now holds amount of segments to show 646 ; xC+0 now holds amount of segments to show
643 647
648 movff hi,divA+0 ; Copy back for numeric output
644 movlw d'7' 649 movlw d'7'
645 cpfslt xC+0 650 cpfslt xC+0
646 bra PLED_graph_vel_7 651 bra PLED_graph_vel_7
647 movlw d'6' 652 movlw d'6'
648 cpfslt xC+0 653 cpfslt xC+0
679 PLED_graph_vel_2: 684 PLED_graph_vel_2:
680 WIN_BOX_STD .72, .72+.6, .67, .73 ; Fill box 685 WIN_BOX_STD .72, .72+.6, .67, .73 ; Fill box
681 PLED_graph_vel_1: 686 PLED_graph_vel_1:
682 WIN_BOX_STD .82, .82+.6, .67, .73 ; Fill box 687 WIN_BOX_STD .82, .82+.6, .67, .73 ; Fill box
683 PLED_graph_vel_0: 688 PLED_graph_vel_0:
684 ; WIN_TOP .90
685 ; WIN_LEFT .0
686 ; WIN_FONT FT_SMALL
687 ; lfsr FSR2,letter
688 ; movff xC+0,lo
689 ; output_99
690 ; PUTC ' '
691 ; movff divA+0,lo
692 ; output_99
693 ; PUTC ' '
694 ; call word_processor
695 return
696
697 689
698 PLED_display_velocity: 690 PLED_display_velocity:
699 ostc_debug 'v' ; Sends debug-information to screen if debugmode active 691 ostc_debug 'v' ; Sends debug-information to screen if debugmode active
700 WIN_TOP .90 692 WIN_TOP .90
701 WIN_LEFT .0 693 WIN_LEFT .0
719 movwf lo 711 movwf lo
720 movlw d'1' 712 movlw d'1'
721 cpfseq lo ; =1? 713 cpfseq lo ; =1?
722 bra PLED_display_velocity_clear1 ; No, clear text display 714 bra PLED_display_velocity_clear1 ; No, clear text display
723 WIN_BOX_BLACK .20, .90, .65, .75 ; Clear graphic display 715 WIN_BOX_BLACK .20, .90, .65, .75 ; Clear graphic display
724 return
725
726 716
727 PLED_display_velocity_clear1: 717 PLED_display_velocity_clear1:
728 movlw d'8' 718 movlw d'8'
729 movwf temp1 719 movwf temp1
730 WIN_TOP .90 720 WIN_TOP .90