Mercurial > public > hwos_code
comparison src/ghostwriter.asm @ 35:eca4a201d8cf
change apnea timeout, do no longer store apnea dives in logbook
author | heinrichsweikamp |
---|---|
date | Sun, 04 Aug 2013 18:04:37 +0200 |
parents | e402813343b6 |
children | e4e91fe8b09d |
comparison
equal
deleted
inserted
replaced
34:d7e6dfd5b498 | 35:eca4a201d8cf |
---|---|
28 ifndef __DEBUG | 28 ifndef __DEBUG |
29 btfsc simulatormode_active ; Are we in simulator mode? | 29 btfsc simulatormode_active ; Are we in simulator mode? |
30 return ; Yes, discard everything | 30 return ; Yes, discard everything |
31 endif | 31 endif |
32 | 32 |
33 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
34 return ; Yes, discard everything | |
35 | |
33 SAFE_2BYTE_COPY rel_pressure, lo | 36 SAFE_2BYTE_COPY rel_pressure, lo |
34 movf lo,W ; store depth with every sample | 37 movf lo,W ; store depth with every sample |
35 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 38 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
36 movf hi,W | 39 movf hi,W |
37 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 40 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
38 | 41 |
39 ;First, find out how many bytes will append to this sample.... | 42 ;First, find out how many bytes will append to this sample.... |
40 clrf ProfileFlagByte ; clear number of bytes to append | 43 clrf ProfileFlagByte ; clear number of bytes to append |
41 | 44 |
42 ; Check Extented informations | 45 ; Check Extented informations |
297 ifndef __DEBUG | 300 ifndef __DEBUG |
298 btfsc simulatormode_active ; Are we in simulator mode? | 301 btfsc simulatormode_active ; Are we in simulator mode? |
299 goto ghostwriter_end_dive_common ; Yes, discard everything | 302 goto ghostwriter_end_dive_common ; Yes, discard everything |
300 endif | 303 endif |
301 | 304 |
302 ; Dive finished (and longer then one minute or Apnoe timeout occured) | 305 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
306 goto ghostwriter_end_dive_common ; Yes, discard everything | |
307 | |
308 ; Dive finished (and longer then one minute) | |
303 | 309 |
304 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives | 310 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives |
305 call apnoe_calc_maxdepth | 311 call apnoe_calc_maxdepth |
306 | 312 |
307 ; calculate desaturation time | 313 ; calculate desaturation time |