# HG changeset patch # User heinrichsweikamp # Date 1412664158 -7200 # Node ID 67db1f6d37875492113d78eca3ea8df6cb1c221b # Parent d097e10b383b9ce7dc54b79f596d865a27abd1d9# Parent 3fdafedc24afee5014b3d80f208703140871fe19 Merge diff -r d097e10b383b -r 67db1f6d3787 src/divemode.asm --- a/src/divemode.asm Mon Oct 06 11:48:23 2014 +0200 +++ b/src/divemode.asm Tue Oct 07 08:42:38 2014 +0200 @@ -740,7 +740,7 @@ return ; return calc_average_depth: - btfsc reset_average_depth ; Reset the Avewrage depth? + btfsc reset_average_depth ; Reset the Average depth? rcall reset_average1 ; Reset the resettable average depth ; 1. Add new 2xdepth to the Sum of depths registers diff -r d097e10b383b -r 67db1f6d3787 src/isr.asm --- a/src/isr.asm Mon Oct 06 11:48:23 2014 +0200 +++ b/src/isr.asm Tue Oct 07 08:42:38 2014 +0200 @@ -428,19 +428,19 @@ movff amb_pressure+1,last_pressure+1 clrf sensor_state_counter ; Then reset State counter + banksel common ; flag2 is in Bank1 btfss simulatormode_active ; are we in simulator mode? bra comp_air_pressure ; no -comp_air_pressure0: + ; Always set pressure_refresh flag in simulator mode + bsf pressure_refresh ; Yes + banksel isr_backup ; Back to Bank0 ISR data movlw LOW d'1000' ; yes, so simulate 1000mbar surface pressure movwf last_surfpressure+0 movlw HIGH d'1000' movwf last_surfpressure+1 - ; Always set pressure_refresh flag in simulator mode - banksel common ; flag1 is in Bank1 - bsf pressure_refresh ; Yes - banksel isr_backup ; Back to Bank0 ISR data comp_air_pressure: + banksel isr_backup ; Back to Bank0 ISR data movf last_surfpressure+0,W ; compensate airpressure subwf amb_pressure+0,W movwf rel_pressure+0 ; rel_pressure stores depth! @@ -662,8 +662,7 @@ bsf store_sample ; ...and set bit for profile storage isr_divemode_1sec2: ; Increase re-setable average depth divetime counter - incf average_divesecs+0,F ; increase stopwatch registers - btfsc STATUS,Z + infsnz average_divesecs+0,F ; increase stopwatch registers incf average_divesecs+1,F ; increase stopwatch registers ; Increase total divetime (Regardless of start_dive_threshold) infsnz total_divetime_seconds+0,F diff -r d097e10b383b -r 67db1f6d3787 tools/ostc3_firmware.hex