Mercurial > public > hwos_code
comparison src/divemode.asm @ 506:b9f06f1a1f74
BUGFIX: PSCR mode "Better Gas" showed bailout gases instead of diluents
| author | heinrichsweikamp |
|---|---|
| date | Mon, 26 Jun 2017 13:02:04 +0200 |
| parents | 18e047102e49 |
| children | 4e6f5c36f4cc |
comparison
equal
deleted
inserted
replaced
| 505:bef07a837a60 | 506:b9f06f1a1f74 |
|---|---|
| 955 tstfsz menupos ; menupos=0? | 955 tstfsz menupos ; menupos=0? |
| 956 bra $+4 ; No | 956 bra $+4 ; No |
| 957 return ; Yes, do not switch gas (There is no Gas #0 !) | 957 return ; Yes, do not switch gas (There is no Gas #0 !) |
| 958 | 958 |
| 959 decf menupos,W ; 1-5 -> 0-4 | 959 decf menupos,W ; 1-5 -> 0-4 |
| 960 btfss FLAG_ccr_mode ; Choose OC Gases | |
| 961 rcall setup_gas_registers ; With WREG=Gas 0-4 | |
| 962 decf menupos,W ; 1-5 -> 0-4 | |
| 963 btfsc FLAG_ccr_mode ; Choose CC Diluents | 960 btfsc FLAG_ccr_mode ; Choose CC Diluents |
| 964 rcall setup_dil_registers ; With WREG=Gas 0-4 | 961 rcall setup_dil_registers ; With WREG=Gas 0-4 |
| 965 decf menupos,W ; 1-5 -> 0-4 | 962 decf menupos,W ; 1-5 -> 0-4 |
| 966 btfsc FLAG_pscr_mode ; Choose CC Diluents | 963 btfsc FLAG_pscr_mode ; Choose CC Diluents |
| 967 rcall setup_dil_registers ; With WREG=Gas 0-4 | 964 rcall setup_dil_registers ; With WREG=Gas 0-4 |
| 968 | 965 ; OC mode? |
| 966 btfsc FLAG_ccr_mode ; CCR? | |
| 967 bra gas_switched_common2 ; Yes | |
| 968 btfsc FLAG_pscr_mode ; PSCR? | |
| 969 bra gas_switched_common2 ; Yes | |
| 970 ; -> OC | |
| 971 decf menupos,W ; 1-5 -> 0-4 | |
| 972 rcall setup_gas_registers ; With WREG=Gas 0-4 | |
| 973 gas_switched_common2: | |
| 969 decf menupos,W ; 1-5 -> 0-4 | 974 decf menupos,W ; 1-5 -> 0-4 |
| 970 btfsc is_bailout ; Choose OC Bailouts (OC Gases) | 975 btfsc is_bailout ; Choose OC Bailouts (OC Gases) |
| 971 rcall setup_gas_registers ; With WREG=Gas 0-4 | 976 rcall setup_gas_registers ; With WREG=Gas 0-4 |
| 972 | 977 |
| 973 call TFT_active_gas_divemode ; Display gas/Setpoint | 978 call TFT_active_gas_divemode ; Display gas/Setpoint |
| 1195 movlw d'100' | 1200 movlw d'100' |
| 1196 movwf xB+0 | 1201 movwf xB+0 |
| 1197 clrf xB+1 | 1202 clrf xB+1 |
| 1198 call div16x16 ; compute depth in full m -> result in xC+0 | 1203 call div16x16 ; compute depth in full m -> result in xC+0 |
| 1199 | 1204 |
| 1200 btfsc FLAG_ccr_mode ; In PSCR mode... | 1205 btfsc FLAG_pscr_mode ; In PSCR mode... |
| 1201 bra check_gas_change2 ; Yes, check for diluents | 1206 bra check_gas_change2 ; Yes, check for diluents |
| 1202 btfss FLAG_ccr_mode ; In CCR mode... | 1207 btfss FLAG_ccr_mode ; In CCR mode... |
| 1203 bra check_gas_change_OC_bail; No, check for OC or bailout | 1208 bra check_gas_change_OC_bail; No, check for OC or bailout |
| 1204 check_gas_change2: | 1209 check_gas_change2: |
| 1205 btfsc is_bailout ; Bailout? | 1210 btfsc is_bailout ; Bailout? |
