Mercurial > public > hwos_code
diff src/divemode.asm @ 111:c61b7a4e317c
Bugfix: CNS in planner
author | heinrichsweikamp |
---|---|
date | Tue, 17 Jun 2014 12:00:20 +0200 |
parents | 223579e905c3 |
children | f3062a611eef |
line wrap: on
line diff
--- a/src/divemode.asm Tue Jun 10 10:14:18 2014 +0200 +++ b/src/divemode.asm Tue Jun 17 12:00:20 2014 +0200 @@ -233,7 +233,21 @@ global set_actual_ppo2 set_actual_ppo2: ; calculate ppO2 in 0.01bar (e.g. 150 = 1.50 bar ppO2) + btfsc divemode ; in divemode + bra set_actual_ppo2_dive ; Yes + ; No, use simulated ambient pressure for char_I_actual_ppO2 + movff char_I_bottom_depth,WREG + mullw .100 + movlw LOW(.1000) + addwf PRODL,W + movwf xA+0 + movlw HIGH(.1000) + addwfc PRODH,W + movwf xA+1 ; P_amb in millibar (1000 = 1.00 bar). + bra set_actual_ppo2_common +set_actual_ppo2_dive: SAFE_2BYTE_COPY amb_pressure, xA ; P_amb in millibar (1000 = 1.00 bar). +set_actual_ppo2_common: movlw d'10' movwf xB+0 clrf xB+1