comparison src/divemode.asm @ 444:d93d75ae01bf

Adjustable timeout for Divemode (Config 0x48)
author heinrichsweikamp
date Wed, 17 Aug 2016 09:50:37 +0200
parents 23b58c4bc6aa
children 9edb1359ce43
comparison
equal deleted inserted replaced
443:84bb5cbebe57 444:d93d75ae01bf
626 626
627 bcf divemode 627 bcf divemode
628 infsnz timeout_counter,F 628 infsnz timeout_counter,F
629 incf timeout_counter2,F ; timeout is 15bits 629 incf timeout_counter2,F ; timeout is 15bits
630 630
631 movlw LOW divemode_timeout 631 movff opt_diveTimeout,WREG ; in [min]
632 movwf sub_a+0 632 mullw .60
633 movlw HIGH divemode_timeout 633 movff PRODL,sub_a+0
634 movwf sub_a+1 634 movff PRODH,sub_a+1 ; in [s]
635 635
636 movff timeout_counter, sub_b+0 636 movff timeout_counter, sub_b+0
637 movff timeout_counter2, sub_b+1 637 movff timeout_counter2, sub_b+1
638 call subU16 ; sub_c = sub_a - sub_b 638 call subU16 ; sub_c = sub_a - sub_b
639 btfss neg_flag ; Result negative? 639 btfss neg_flag ; Result negative?