Mercurial > public > hwos_code
comparison src/gaslist.asm @ 154:afa31c815f24
NEW: Show ppO2 for change depth during gas setup
author | heinrichsweikamp |
---|---|
date | Wed, 27 Aug 2014 17:38:21 +0200 |
parents | 53a99a2dc6a1 |
children | 99ac325586ce |
comparison
equal
deleted
inserted
replaced
153:0bd6dff01204 | 154:afa31c815f24 |
---|---|
547 movwf hi ; Copy O2% | 547 movwf hi ; Copy O2% |
548 movlw warn_gas_in_gaslist | 548 movlw warn_gas_in_gaslist |
549 call TFT_color_code1 ; Color-code current row in Gaslist (%O2 in hi), opt_ppO2_max as threshold | 549 call TFT_color_code1 ; Color-code current row in Gaslist (%O2 in hi), opt_ppO2_max as threshold |
550 return | 550 return |
551 ;---------------------------------------------------------------------------- | 551 ;---------------------------------------------------------------------------- |
552 | |
553 global gaslist_ppo2 | |
554 gaslist_ppo2: | |
555 STRCAT_TEXT tppO2 ; ppO2: | |
556 movf gaslist_gas,W | |
557 lfsr FSR1,char_I_dil_change-.5 ; Setup Diluents | |
558 btfss ccr_diluent_setup ; In CCR-Menu? | |
559 lfsr FSR1,opt_OC_bail_gas_change ; No, setup OC/Bailout Gases | |
560 movf PLUSW1,W | |
561 mullw .10 ; PROD=Depth in mbar/10 (100 = 1.00 bar) | |
562 movlw .100 | |
563 addwf PRODL,F | |
564 movlw .0 | |
565 addwfc PRODH,F ; add 1bar | |
566 movff PRODL,xA+0 | |
567 movff PRODH,xA+1 | |
568 movf gaslist_gas,W ; Read current gas O2 ratio | |
569 lfsr FSR1,opt_dil_O2_ratio-.5 ; Read dil_gas_O2_ratio[WREG] | |
570 btfss ccr_diluent_setup ; In CCR-Menu? | |
571 lfsr FSR1,opt_gas_O2_ratio ; No, read opt_gas_O2_ratio[WREG] | |
572 movff PLUSW1,xB+0 | |
573 clrf xB+1 | |
574 call mult16x16 ; char_I_O2_ratio * (p_amb/10) | |
575 movff xC+0,xA+0 | |
576 movff xC+1,xA+1 | |
577 movlw d'100' | |
578 movwf xB+0 | |
579 clrf xB+1 | |
580 call div16x16 ; xC=(char_I_O2_ratio * p_amb/10)/100 | |
581 ; Check very high ppO2 manually | |
582 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? | |
583 bra gaslist_ppo2_2 ; Yes, display fixed Value! | |
584 movff xC+0,lo | |
585 movff xC+1,hi | |
586 bcf ignore_digit4 | |
587 bsf leftbind | |
588 output_16dp d'3' ; x.xx | |
589 STRCAT_TEXT tbar ; bar | |
590 return | |
591 gaslist_ppo2_2: | |
592 STRCAT ">6.6" | |
593 return | |
594 | |
552 global gaslist_MOD_END | 595 global gaslist_MOD_END |
553 gaslist_MOD_END: | 596 gaslist_MOD_END: |
554 rcall gaslist_calc_mod ; Compute MOD into WREG | 597 rcall gaslist_calc_mod ; Compute MOD into WREG |
555 movwf lo ; Copy to lo | 598 movwf lo ; Copy to lo |
556 STRCAT_TEXT tMOD ; MOD: | 599 STRCAT_TEXT tMOD ; MOD: |
621 gaslist_reset_mod_title2: | 664 gaslist_reset_mod_title2: |
622 rcall gaslist_calc_mod ; Compute MOD into WREG | 665 rcall gaslist_calc_mod ; Compute MOD into WREG |
623 movwf lo ; Copy to lo | 666 movwf lo ; Copy to lo |
624 | 667 |
625 movf gaslist_gas,W ; Compare to switch depth | 668 movf gaslist_gas,W ; Compare to switch depth |
626 lfsr FSR1,char_I_dil_change ; Setup Diluents mH | 669 lfsr FSR1,char_I_dil_change ; Setup Diluents |
627 btfss ccr_diluent_setup ; In CCR-Menu? | 670 btfss ccr_diluent_setup ; In CCR-Menu? |
628 lfsr FSR1,opt_OC_bail_gas_change ; No, setup OC Gases | 671 lfsr FSR1,opt_OC_bail_gas_change ; No, setup OC Gases |
629 movf PLUSW1,W | 672 movf PLUSW1,W |
630 cpfslt lo | 673 cpfslt lo |
631 bra gaslist_strcat_4 ; And return... | 674 bra gaslist_strcat_4 ; And return... |