diff src/ghostwriter.asm @ 23:e402813343b6

new option to switch samplingrate between 10s and 2s
author heinrichsweikamp
date Mon, 08 Jul 2013 12:38:16 +0200
parents 13cda523891f
children eca4a201d8cf
line wrap: on
line diff
--- a/src/ghostwriter.asm	Mon Jul 08 11:37:37 2013 +0200
+++ b/src/ghostwriter.asm	Mon Jul 08 12:38:16 2013 +0200
@@ -579,9 +579,9 @@
 	movf	batt_voltage+1,W
 	rcall	ghostwrite_byte_header
 
-	movlw	samplingrate				; Sampling rate
-	btfsc	FLAG_apnoe_mode				; Apnoe mode?
-	movlw	samplingrate_apnoe			; Apnoe sampling rate
+	movf    samplingrate,W			; Sampling rate
+    btfsc	FLAG_apnoe_mode         ; Apnoe mode?
+	movlw	samplingrate_apnoe		; Apnoe sampling rate
 	rcall	ghostwrite_byte_header	; WREG -> Header in ext. flash
 
     ; CNS at gebinning of dive
@@ -804,7 +804,7 @@
     ; Keep room for dive length ext_flash_dive_counter:3 (Stored at the end of the dive)
     incf_ext_flash_address_0x20	d'3'        ; Skip Bytes in external flash (faster)
 
-	movlw	samplingrate				; Sampling rate
+	movf	samplingrate,W  			; Sampling rate
 	btfsc	FLAG_apnoe_mode				; Apnoe mode?
 	movlw	samplingrate_apnoe			; Apnoe sampling rate
 	rcall	ghostwrite_byte_profile 	; WREG -> Profile in ext. flash