comparison src/divemode.asm @ 530:d36f9fca10ae

2.20beta release BUGFIX: Minor dive mode layout fixes in CCR Mode CHANGE: Minor German language fixes NEW: Warning for Diluent beeing out of safe ppO2 range in CCR modes NEW: New Customview 9 in OSTC cR or OSTC3 shows mV readings after Sensor calibration
author heinrichsweikamp
date Thu, 17 Aug 2017 13:20:03 +0200
parents 015b7fdd90a7
children ad7dc231c180
comparison
equal deleted inserted replaced
529:08d7eb26665c 530:d36f9fca10ae
130 movlw .6 130 movlw .6
131 cpfseq menupos3 ; in compass view? 131 cpfseq menupos3 ; in compass view?
132 bra diveloop_loop4a ; No 132 bra diveloop_loop4a ; No
133 extern TFT_dive_compass_heading 133 extern TFT_dive_compass_heading
134 call TFT_dive_compass_heading ; Yes, update compass heading value 134 call TFT_dive_compass_heading ; Yes, update compass heading value
135 call TFT_temp_divemode ; Redraw temperature
135 diveloop_loop4a: 136 diveloop_loop4a:
136 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) 137 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump)
137 bra diveloop_loop5 138 bra diveloop_loop5
138 bra diveloop_loop6 139 bra diveloop_loop6
139 diveloop_loop5: 140 diveloop_loop5:
1681 bra divemode_check_for_warnings2 1682 bra divemode_check_for_warnings2
1682 btfsc FLAG_gauge_mode ; Done for Apnoe or Gauge mode 1683 btfsc FLAG_gauge_mode ; Done for Apnoe or Gauge mode
1683 bra divemode_check_for_warnings2 1684 bra divemode_check_for_warnings2
1684 1685
1685 ; Warnings only in deco modes 1686 ; Warnings only in deco modes
1686 btfss FLAG_ccr_mode ; Don't check in CCR mode 1687 rcall check_ppO2 ; check ppO2 and displays warning, if required
1687 rcall check_ppO2 ; check ppO2 and displays warning, if required
1688 1688
1689 btfsc is_bailout ; But check in Bailout case...
1690 rcall check_ppO2 ; check ppO2 and displays warning, if required
1691 rcall check_cns_violation ; Check CNS value and display it, if required 1689 rcall check_cns_violation ; Check CNS value and display it, if required
1692 btfsc decostop_active ; In deco mode? 1690 btfsc decostop_active ; In deco mode?
1693 rcall check_and_store_gf_violation ; Yes, Sets warnings, if required 1691 rcall check_and_store_gf_violation ; Yes, Sets warnings, if required
1694 btfsc decostop_active ; In deco mode? 1692 btfsc decostop_active ; In deco mode?
1695 call TFT_ftts ; Show @+x time 1693 call TFT_ftts ; Show @+x time
1828 movff opt_ppO2_max_deco,xB+1 ; xB+1 used as temp here 1826 movff opt_ppO2_max_deco,xB+1 ; xB+1 used as temp here
1829 movlw .3 1827 movlw .3
1830 cpfseq xA+0 ; Deco? 1828 cpfseq xA+0 ; Deco?
1831 movff opt_ppO2_max,xB+1 ; No, overwrite with travel/bottom max 1829 movff opt_ppO2_max,xB+1 ; No, overwrite with travel/bottom max
1832 movf xB+1,W ; Result in WREG 1830 movf xB+1,W ; Result in WREG
1833 addlw .1 ; e.g. >1.60
1834 mullw d'100' ; opt_ppO2_max*100 1831 mullw d'100' ; opt_ppO2_max*100
1835 movff PRODL,sub_a+0 1832 movff PRODL,sub_a+0
1836 movff PRODH,sub_a+1 1833 movff PRODH,sub_a+1
1834 infsnz sub_a+0,F
1835 incf sub_b+1,F
1837 call subU16 1836 call subU16
1838 btfss neg_flag 1837 btfss neg_flag
1839 return ; Done. Not too high 1838 return ; Done. Not too high
1840 movlw d'5' ; Type of Alarm (ppO2 high) 1839 movlw d'5' ; Type of Alarm (ppO2 high)
1841 movwf AlarmType ; Copy to Alarm Register 1840 movwf AlarmType ; Copy to Alarm Register
1865 movlw .12 1864 movlw .12
1866 cpfseq menupos3 ; ppO2 shown in Custom View 12? 1865 cpfseq menupos3 ; ppO2 shown in Custom View 12?
1867 bra check_ppO2_c ; No 1866 bra check_ppO2_c ; No
1868 return ; Yes, do not show twice (in custom view and in warning area) 1867 return ; Yes, do not show twice (in custom view and in warning area)
1869 check_ppO2_c: 1868 check_ppO2_c:
1869 movlw .10
1870 cpfseq menupos3 ; ppO2 shown in Custom View 10?
1871 bra check_ppO2_d ; No
1872 return ; Yes, do not show twice (in custom view and in warning area)
1873 check_ppO2_d:
1870 incf warning_counter,F ; increase counter 1874 incf warning_counter,F ; increase counter
1871 goto TFT_display_ppo2 ; Show ppO2 (and return) 1875 goto TFT_display_ppo2 ; Show ppO2 (and return)
1872 1876
1873 global check_cns_violation 1877 global check_cns_violation
1874 check_cns_violation: 1878 check_cns_violation: