comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 4:2b5c52ae3923

1.52 beta rc
author heinrichsweikamp
date Sun, 14 Feb 2010 20:09:25 +0100
parents 3cf8af30b36e
children d8b426d71282
comparison
equal deleted inserted replaced
3:3cf8af30b36e 4:2b5c52ae3923
2625 return 2625 return
2626 2626
2627 PLED_const_ppO2_value: 2627 PLED_const_ppO2_value:
2628 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 2628 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
2629 return ; Yes, No update and return! 2629 return ; Yes, No update and return!
2630 btfsc menubit ; Divemode menu active?
2631 return ; Yes, No update and return!
2632 btfsc premenu ; Showing "Menu?"?
2633 return ; Yes, do not display ppO2/"Bail"
2634 2630
2635 ostc_debug 'j' ; Sends debug-information to screen if debugmode active 2631 ostc_debug 'j' ; Sends debug-information to screen if debugmode active
2636 2632
2637 WIN_TOP .168 2633 WIN_TOP .168
2638 WIN_LEFT .65 2634 WIN_LEFT .65
2639 WIN_FONT FT_SMALL 2635 WIN_FONT FT_SMALL
2640 WIN_INVERT .0 ; Init new Wordprocessor 2636 WIN_INVERT .0 ; Init new Wordprocessor
2641 call PLED_standard_color 2637 call PLED_standard_color
2638
2642 lfsr FSR2,letter 2639 lfsr FSR2,letter
2643 movff char_I_const_ppO2,lo 2640 movff char_I_const_ppO2,lo
2644 2641
2645 tstfsz lo ; In Bailout mode (char_I_const_ppO2=0)? 2642 tstfsz lo ; In Bailout mode (char_I_const_ppO2=0)?
2646 bra PLED_const_ppO2_value2 ; No, display Setpoint 2643 bra PLED_const_ppO2_value2 ; No, display Setpoint
2650 call word_processor 2647 call word_processor
2651 return 2648 return
2652 2649
2653 PLED_const_ppO2_value2: ; Display SetPoint 2650 PLED_const_ppO2_value2: ; Display SetPoint
2654 ;Show fixed SP value 2651 ;Show fixed SP value
2652 movff amb_pressure+0,xA+0
2653 movff amb_pressure+1,xA+1
2654 movlw d'10'
2655 movwf xB+0
2656 clrf xB+1
2657 ;xA/xB=xC with xA as remainder
2658 call div16x16 ; xC+0=p_amb/10
2659 ; char_I_const_ppO2 > p_amb/10 -> Not physically possible! -> Display actual value!
2660
2661 tstfsz xC+1 ; xC>255
2662 setf xC+0 ; Yes, set xC+0 to 2,55bar ppO2
2663
2664 movff ppO2_setpoint_store,WREG
2665 cpfslt xC+0 ; Setpoint value possible?
2666 bra PLED_const_ppO2_value1 ; Yes!
2667
2668 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value
2669 bra PLED_const_ppO2_value1a
2670
2671 PLED_const_ppO2_value1:
2672
2673 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint
2674
2675 PLED_const_ppO2_value1a:
2676 movff char_I_const_ppO2,lo
2655 clrf hi 2677 clrf hi
2656 bsf leftbind 2678 bsf leftbind
2657 output_16dp d'3' 2679 output_16dp d'3'
2658 bcf leftbind 2680 bcf leftbind
2659 call word_processor 2681 call word_processor