diff src/divemenu_tree.asm @ 181:32c17df38423

BUGFIX: END/EAD updated when adjusting current gas during the dive
author heinrichsweikamp
date Thu, 09 Oct 2014 11:18:56 +0200
parents 87cc1adfe4da
children 93023d78812e
line wrap: on
line diff
--- a/src/divemenu_tree.asm	Wed Oct 08 17:57:37 2014 +0200
+++ b/src/divemenu_tree.asm	Thu Oct 09 11:18:56 2014 +0200
@@ -159,6 +159,10 @@
         decf    char_I_O2_ratio,F            ; O2-- (Unchanged)
 ;        bra     do_divemode_gaslist_more_common
 do_divemode_gaslist_more_common:
+    	movf    char_I_O2_ratio,W       ; Add O2...
+        addwf   char_I_He_ratio,W       ; ...and He...
+    	sublw   .100                    ; ...subtract both from 100
+    	movwf   char_I_N2_ratio         ; -> N2!
         banksel common
         bsf     gas6_changed                ; Set flag
         bra     do_divemode_gaslist_more
@@ -183,7 +187,6 @@
         movlw   .101
         cpfslt  lo                           ; O2+He<101?
         decf    char_I_He_ratio,F            ; Yes, He-- (Unchanged)
-        banksel common
         bra     do_divemode_gaslist_more_common
 
 do_dive_mHe: