diff src/divemode.asm @ 398:1f2e35f5a5aa

BUGFIX: Make sure SP1 is always selected on start in Auto-SP mode CHANGE: Show velocity from 5m/min or more (Ascend or descent) Work on new speed graph
author heinrichsweikamp
date Mon, 23 Nov 2015 16:13:25 +0100
parents 9175429bdeba
children db25f2028074
line wrap: on
line diff
--- a/src/divemode.asm	Mon Nov 23 13:29:41 2015 +0100
+++ b/src/divemode.asm	Mon Nov 23 16:13:25 2015 +0100
@@ -1410,8 +1410,9 @@
     rcall   divemode_setup_sensor_values    ; setup sensor values
 
     ; Setup first SP for Fixed or Auto mode
-    TSTOSS  opt_ccr_mode                    ; =0: Fixed SP, =1: Sensor
-    movff   char_I_setpoint_cbar+0,char_I_const_ppO2    ; Setup fixed Setpoint (Always start with SP1)
+    movff   opt_ccr_mode,WREG               ; =0: Fixed SP, =1: Sensor,  =2: Auto SP
+    sublw   .1                              ; opt_ccr_mode = 1 (Sensor)?
+    movff   char_I_setpoint_cbar+0,char_I_const_ppO2    ; No, setup fixed Setpoint (Always start with SP1)
     movff   char_I_const_ppO2,WREG
     call    transmit_setpoint           ; Transmit current setpoint from WREG (in cbar) to external electronics
     bsf     setpoint_changed                ; Set flag (For profile)