comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 793:55bd11e07d9f

BUGFIX: Surface interval was paused during simulator
author heinrichsweikamp
date Sun, 28 Sep 2014 20:56:16 +0200
parents 53425d598585
children ba084dfa4b36
comparison
equal deleted inserted replaced
792:19aec5caa759 793:55bd11e07d9f
1300 goto end_dive_common ; No, discard everything 1300 goto end_dive_common ; No, discard everything
1301 1301
1302 ; In DEBUG compile, keep all simulated dives in logbook, Desat time, nofly, etc... 1302 ; In DEBUG compile, keep all simulated dives in logbook, Desat time, nofly, etc...
1303 ifndef __DEBUG 1303 ifndef __DEBUG
1304 btfsc simulatormode_active ; Are we in simulator mode? 1304 btfsc simulatormode_active ; Are we in simulator mode?
1305 goto end_dive_common ; Yes, discard everything 1305 goto end_dive_common_sim ; Yes, discard everything
1306 endif 1306 endif
1307 1307
1308 ; Dive finished (and longer then one minute or Apnoe timeout occured) 1308 ; Dive finished (and longer then one minute or Apnoe timeout occured)
1309 1309
1310 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives 1310 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives
1679 btfsc restore_deco_data ; Restore decodata? 1679 btfsc restore_deco_data ; Restore decodata?
1680 call simulator_restore_tissue_data ; Yes! 1680 call simulator_restore_tissue_data ; Yes!
1681 endif 1681 endif
1682 1682
1683 goto surfloop_no_display_init ; and return to surfaceloop 1683 goto surfloop_no_display_init ; and return to surfaceloop
1684
1685 end_dive_common_sim:
1686 movf divemins+0,W
1687 addwf surface_interval+0,F
1688 movf divemins+1,W
1689 addwfc surface_interval+1 ; Add simulated divetime to surface interval
1690 bra end_dive_common
1684 1691
1685 timeout_divemode: 1692 timeout_divemode:
1686 btfss realdive ; Dive longer then one minute 1693 btfss realdive ; Dive longer then one minute
1687 return 1694 return
1688 1695