comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 457:993e681e89cf

no decodata in logbook for apnea dives
author heinrichsweikamp
date Thu, 01 Sep 2011 11:57:11 +0200
parents 38b38b105782
children d300e6ad6f66
comparison
equal deleted inserted replaced
456:f4fbda6db91c 457:993e681e89cf
559 movff eeprom_address+0, eeprom_header_address+0 ; store startposition 559 movff eeprom_address+0, eeprom_header_address+0 ; store startposition
560 movff eeprom_address+1, eeprom_header_address+1 ; store startposition 560 movff eeprom_address+1, eeprom_header_address+1 ; store startposition
561 561
562 ; shift address for header 562 ; shift address for header
563 ; the header will be stored after the dive 563 ; the header will be stored after the dive
564 incf_eeprom_address d'57' ; Macro, that adds 8Bit to eeprom_address:2 with banking at 0x8000 564 incf_eeprom_address d'57' ; Macro, that adds 8Bit to eeprom_address:2
565 565
566 store_dive_data2: 566 store_dive_data2:
567 SAFE_2BYTE_COPY rel_pressure, lo 567 SAFE_2BYTE_COPY rel_pressure, lo
568 movf lo,W ; store depth with every sample 568 movf lo,W ; store depth with every sample
569 call write_external_eeprom 569 call write_external_eeprom
776 movf decodata+0,W ; =0:no stop dive, if in deco mode: ceiling in m 776 movf decodata+0,W ; =0:no stop dive, if in deco mode: ceiling in m
777 call write_external_eeprom 777 call write_external_eeprom
778 movf decodata+1,W ; no stop time of length of first stop 778 movf decodata+1,W ; no stop time of length of first stop
779 call write_external_eeprom 779 call write_external_eeprom
780 GETCUSTOM8 d'22' 780 GETCUSTOM8 d'22'
781
782 btfsc FLAG_apnoe_mode ; in Apnoe mode?
783 movlw d'0' ; Yes, set to zero
781 movwf divisor_deco ; Reload divisor from CF 784 movwf divisor_deco ; Reload divisor from CF
782 return 785 return
783 786
784 store_dive_temperature: 787 store_dive_temperature:
785 SAFE_2BYTE_COPY temperature,lo 788 SAFE_2BYTE_COPY temperature,lo
1762 GETCUSTOM8 d'20' ; sample rate 1765 GETCUSTOM8 d'20' ; sample rate
1763 movwf samplesecs_value ; to avoid EEPROM access in the ISR 1766 movwf samplesecs_value ; to avoid EEPROM access in the ISR
1764 GETCUSTOM8 d'21' 1767 GETCUSTOM8 d'21'
1765 movwf divisor_temperature ; load divisors for profile storage 1768 movwf divisor_temperature ; load divisors for profile storage
1766 GETCUSTOM8 d'22' 1769 GETCUSTOM8 d'22'
1770 btfsc FLAG_apnoe_mode ; in Apnoe mode?
1771 movlw d'0' ; Yes, set to zero
1767 movwf divisor_deco 1772 movwf divisor_deco
1768 GETCUSTOM8 d'23' 1773 GETCUSTOM8 d'23'
1769 movwf divisor_gf 1774 movwf divisor_gf
1770 GETCUSTOM8 d'24' 1775 GETCUSTOM8 d'24'
1771 movwf divisor_ppo2 1776 movwf divisor_ppo2