diff src/start.asm @ 480:ad8acade5567

NEW: PSCR mode (Passive semi-closed rebreather)
author heinrichsweikamp
date Mon, 06 Feb 2017 16:26:36 +0100
parents 237afdfb4918
children 7e6df19264b6
line wrap: on
line diff
--- a/src/start.asm	Wed Feb 01 13:51:59 2017 +0100
+++ b/src/start.asm	Mon Feb 06 16:26:36 2017 +0100
@@ -286,9 +286,10 @@
     clrf	flag9
     clrf	flag10
     ; Do not clear flag11 (Sensor calibration and charger status)
-    clrf    flag12
+    clrf	flag12
 ;    ; Do not clear flag13 (Important hardware flags)
-    clrf    hardware_flag           ; hardware descriptor flag
+    clrf	flag14
+    clrf	hardware_flag           ; hardware descriptor flag
     bsf		tft_is_dimming          ; TFT is dimming up (soon), ignore ambient sensor!
 
     ; configure hardware_flag byte
@@ -385,11 +386,12 @@
     movlw   .10
     movwf   samplingrate
 restart_set_modes_and_flags1:
-    movff   opt_dive_mode,lo            ; 0=OC, 1=CC, 2=Gauge, 3=Apnea
+    movff   opt_dive_mode,lo            ; 0=OC, 1=CC, 2=Gauge, 3=Apnea, 4=PSCR
 
 	bcf		FLAG_apnoe_mode
     bcf     FLAG_ccr_mode             ; =1: CCR mode (Fixed ppO2 or Sensor) active
     bcf     FLAG_gauge_mode           ; =1: In Gauge mode
+    bcf	    FLAG_pscr_mode
     call    disable_ir_s8             ; IR off
 
     tstfsz  lo
@@ -426,10 +428,18 @@
     return
 
 restart_set_modes_and_flags4:
+    decfsz  lo,F
+    bra     restart_set_modes_and_flags5
     ; Apnea Mode
-	bsf		FLAG_apnoe_mode
+    bsf		FLAG_apnoe_mode
     return							    ; start in Surfacemode
 
+restart_set_modes_and_flags5:
+    ; PSCR Mode
+    bsf		FLAG_pscr_mode
+    return							    ; start in Surfacemode
+    
+    
 backup_flash_page:       ; backup the first 128bytes from flash to EEPROM
     	; Start address in internal flash
     	movlw   0x00