comparison src/isr.asm @ 645:070528a88715

3.16 release
author heinrichsweikamp
date Sun, 07 Nov 2021 12:39:23 +0100
parents 7d8a4c60ec1a
children ef2ed7e3a895
comparison
equal deleted inserted replaced
644:1e695355dfc4 645:070528a88715
655 655
656 rcall isr_battery_gauge ; calculate the current charge consumption and add it to the battery gauge 656 rcall isr_battery_gauge ; calculate the current charge consumption and add it to the battery gauge
657 rcall isr_update_uptime ; increment overall OSTC uptime 657 rcall isr_update_uptime ; increment overall OSTC uptime
658 rcall isr_update_timeout ; process the timeout timer 658 rcall isr_update_timeout ; process the timeout timer
659 659
660 movff opt_brightness_surface,brightness ; copy brightness - will be overwritten with opt_brightness_dive if in dive mdoe
660 btfsc divemode ; in dive mode? 661 btfsc divemode ; in dive mode?
661 rcall isr_divemode_1sec ; YES - do the every second dive mode tasks 662 rcall isr_divemode_1sec ; YES - do the every second dive mode tasks
662 663
663 ; increment surface interval counted in seconds 664 ; increment surface interval counted in seconds
664 btfsc divemode ; in dive mode? 665 btfsc divemode ; in dive mode?
812 813
813 ;----------------------------------------------------------------------------- 814 ;-----------------------------------------------------------------------------
814 ; Every Second Tasks while in Dive Mode 815 ; Every Second Tasks while in Dive Mode
815 ; 816 ;
816 isr_divemode_1sec: 817 isr_divemode_1sec:
818 movff opt_brightness_divemode,brightness ; copy brightness for dive mode
817 decfsz sampling_timer,F ; decrement sampling timer, became zero? 819 decfsz sampling_timer,F ; decrement sampling timer, became zero?
818 bra isr_divemode_1sec_1 ; NO 820 bra isr_divemode_1sec_1 ; NO
819 bsf trigger_sample_divedata ; YES - set trigger flag for sampling dive data 821 bsf trigger_sample_divedata ; YES - set trigger flag for sampling dive data
820 movff sampling_rate,sampling_timer; - reload timer 822 movff sampling_rate,sampling_timer; - reload timer
821 823
864 clrf apnoe_dive_secs ; YES - reset seconds to 0 866 clrf apnoe_dive_secs ; YES - reset seconds to 0
865 incf apnoe_dive_mins,F ; - increment dive time, minutes 867 incf apnoe_dive_mins,F ; - increment dive time, minutes
866 return ; - done 868 return ; - done
867 869
868 isr_divemode_1sec_4: ; at surface 870 isr_divemode_1sec_4: ; at surface
871 movff opt_brightness_surface,brightness ; copy brightness
869 btfss FLAG_apnoe_mode ; in apnoe mode? 872 btfss FLAG_apnoe_mode ; in apnoe mode?
870 return ; NO - done 873 return ; NO - done
871 bsf apnoe_at_surface ; YES - memorize been at the surface 874 bsf apnoe_at_surface ; YES - memorize been at the surface
872 incf apnoe_surface_secs,F ; - increment surface time, seconds 875 incf apnoe_surface_secs,F ; - increment surface time, seconds
873 movlw d'59' ; - 60 seconds make a minute 876 movlw d'59' ; - 60 seconds make a minute