Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 233:2cbaa01dac26
Hunting for NoFly (bug BB13)... not found yet...
+ In DEBUG compile, keep simulated dives in logbook, desat and nofly time, etc.
author | JeanDo |
---|---|
date | Tue, 15 Mar 2011 19:16:34 +0100 |
parents | 85ea09d3b9d8 |
children | 55178aa1f972 |
comparison
equal
deleted
inserted
replaced
232:59c479181724 | 233:2cbaa01dac26 |
---|---|
489 | 489 |
490 store_dive_data: ; CF20 seconds gone | 490 store_dive_data: ; CF20 seconds gone |
491 bcf store_sample ; update only any CF20 seconds | 491 bcf store_sample ; update only any CF20 seconds |
492 bsf update_divetime ; update divemins every CF20 seconds | 492 bsf update_divetime ; update divemins every CF20 seconds |
493 | 493 |
494 btfsc simulatormode_active ; Are we in simulator mode? | 494 ifndef __DEBUG |
495 return ; Yes, discard everything | 495 btfsc simulatormode_active ; Are we in simulator mode? |
496 return ; Yes, discard everything | |
497 endif | |
496 | 498 |
497 btfsc header_stored ; Header already stored? | 499 btfsc header_stored ; Header already stored? |
498 bra store_dive_data2 ; Yes, store only profile data | 500 bra store_dive_data2 ; Yes, store only profile data |
499 bsf header_stored ; Store header | 501 bsf header_stored ; Store header |
500 | 502 |
1017 | 1019 |
1018 end_dive: | 1020 end_dive: |
1019 btfss realdive ; dive longer then one minute | 1021 btfss realdive ; dive longer then one minute |
1020 goto end_dive_common ; No, discard everything | 1022 goto end_dive_common ; No, discard everything |
1021 | 1023 |
1022 btfsc simulatormode_active ; Are we in simulator mode? | 1024 ; In DEBUG compile, keep all simulated dives in logbook, Desat time, nofly, etc... |
1023 goto end_dive_common ; Yes, discard everything | 1025 ifndef __DEBUG |
1026 btfsc simulatormode_active ; Are we in simulator mode? | |
1027 goto end_dive_common ; Yes, discard everything | |
1028 endif | |
1024 | 1029 |
1025 ; Dive finished (and longer then one minute or Apnoe timeout occured) | 1030 ; Dive finished (and longer then one minute or Apnoe timeout occured) |
1026 | 1031 |
1027 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives | 1032 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives |
1028 rcall apnoe_calc_maxdepth | 1033 rcall apnoe_calc_maxdepth |
1289 return | 1294 return |
1290 | 1295 |
1291 btfsc FLAG_apnoe_mode ; In Apnoe mode? | 1296 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
1292 bra timeout_divemode2 ; Yes, use CF30 [min] for timeout | 1297 bra timeout_divemode2 ; Yes, use CF30 [min] for timeout |
1293 | 1298 |
1294 btfsc simulatormode_active ; In Simulator mode? | 1299 ifndef __DEBUG |
1295 bra timeout_divemode3 ; Yes, use fixed 5 seconds timeout | 1300 btfsc simulatormode_active ; In Simulator mode? |
1301 bra timeout_divemode3 ; Yes, use fixed 5 seconds timeout | |
1302 endif | |
1296 | 1303 |
1297 bcf divemode | 1304 bcf divemode |
1298 incf timeout_counter,F | 1305 incf timeout_counter,F |
1299 GETCUSTOM8 d'2' ; diveloop_timeout | 1306 GETCUSTOM8 d'2' ; diveloop_timeout |
1300 addlw d'2' ; adds two seconds in case timout=zero! | 1307 addlw d'2' ; adds two seconds in case timout=zero! |