Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/divemode.asm @ 730:ae641bcb0d02
store a bailout event in the logbook
author | heinrichsweikamp |
---|---|
date | Sun, 16 Jun 2013 16:09:02 +0200 |
parents | c6d57bed1ba0 |
children | 920afa50bb0b |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 16 15:50:37 2013 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 16 16:09:02 2013 +0200 @@ -758,6 +758,12 @@ addwf ProfileFlagByte,F ; add to ProfileFlagByte bsf EventByte,6 ; Also set Flag in EventByte! check_event3: + btfss store_bailout_event ; Check flag + bra check_event4 + movlw d'2' ; Information length + addwf ProfileFlagByte,F ; add to ProfileFlagByte + bsf EventByte,7 ; Also set Flag in EventByte! +check_event4: bsf ProfileFlagByte,7 ; Set EventByte Flag in ProfileFlagByte store_dive_data3: @@ -841,6 +847,14 @@ bcf setpoint_changed ; Clear this event store_dive_data5: + btfss store_bailout_event ; Check flag + bra store_dive_data6 + movff char_I_O2_ratio,WREG + call write_external_eeprom + movff char_I_He_ratio,WREG + call write_external_eeprom + bcf store_bailout_event ; Clear this event +store_dive_data6: bcf event_occured ; Clear the global event flag return ; Done. (Sample with all informations written to EEPROM) @@ -2028,6 +2042,7 @@ clrf AlarmType ; Clear all alarms bcf event_occured ; clear flag bcf setpoint_changed ; clear flag + bcf store_bailout_event ; clear flag rcall reset_average1 ; Reset the resettable average depth clrf average_depth_hold_total+0 clrf average_depth_hold_total+1