comparison src/isr.asm @ 148:022b886eddaf

some cleanup
author heinrichsweikamp
date Wed, 06 Aug 2014 17:38:31 +0200
parents fdd4e30846ae
children 19ad15f04f60
comparison
equal deleted inserted replaced
147:fdd4e30846ae 148:022b886eddaf
579 addwf battery_gauge+0,F 579 addwf battery_gauge+0,F
580 movf isr2_temp,W 580 movf isr2_temp,W
581 addwfc battery_gauge+1,F 581 addwfc battery_gauge+1,F
582 movlw .0 582 movlw .0
583 addwfc battery_gauge+2,F 583 addwfc battery_gauge+2,F
584 movlw .0
585 addwfc battery_gauge+3,F 584 addwfc battery_gauge+3,F
586 movlw .0
587 addwfc battery_gauge+4,F 585 addwfc battery_gauge+4,F
588 movlw .0
589 addwfc battery_gauge+5,F 586 addwfc battery_gauge+5,F
590 return 587 return
591 588
592 isr_battery_gauge2: 589 isr_battery_gauge2:
593 ; set consumtion rate in nAs for an one second interval 590 ; set consumtion rate in nAs for an one second interval
668 ; Increase re-setable average depth divetime counter 665 ; Increase re-setable average depth divetime counter
669 incf average_divesecs+0,F ; increase stopwatch registers 666 incf average_divesecs+0,F ; increase stopwatch registers
670 btfsc STATUS,Z 667 btfsc STATUS,Z
671 incf average_divesecs+1,F ; increase stopwatch registers 668 incf average_divesecs+1,F ; increase stopwatch registers
672 ; Increase total divetime (Regardless of start_dive_threshold) 669 ; Increase total divetime (Regardless of start_dive_threshold)
673 incf total_divetime_seconds+0,F 670 infsnz total_divetime_seconds+0,F
674 movlw .0 671 incf total_divetime_seconds+1,F ; Total dive time (Regardless of start_dive_threshold)
675 addwfc total_divetime_seconds+1,F ; Total dive time (Regardless of start_dive_threshold)
676 672
677 btfss divemode2 ; displayed divetime is running? 673 btfss divemode2 ; displayed divetime is running?
678 return ; No (e.g. too shallow) 674 return ; No (e.g. too shallow)
679 675
680 ; increase divetime registers (Displayed dive time) 676 ; increase divetime registers (Displayed dive time)
683 cpfsgt divesecs 679 cpfsgt divesecs
684 bra isr_divemode_1sec2a 680 bra isr_divemode_1sec2a
685 681
686 clrf divesecs 682 clrf divesecs
687 bsf realdive ; this bit is always set (again) if the dive is longer then one minute 683 bsf realdive ; this bit is always set (again) if the dive is longer then one minute
688 incf divemins+0,F 684 infsnz divemins+0,F
689 movlw .0 685 incf divemins+1,F ; increase divemins
690 addwfc divemins+1,F ; increase divemins
691 686
692 isr_divemode_1sec2a: 687 isr_divemode_1sec2a:
693 btfss FLAG_apnoe_mode ; Are we in Apnoe mode? 688 btfss FLAG_apnoe_mode ; Are we in Apnoe mode?
694 return ; No 689 return ; No
695 690