summaryrefslogtreecommitdiff
path: root/software/ihu/solar.inc
diff options
context:
space:
mode:
Diffstat (limited to 'software/ihu/solar.inc')
-rw-r--r--software/ihu/solar.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/software/ihu/solar.inc b/software/ihu/solar.inc
index c41bcc3..484a538 100644
--- a/software/ihu/solar.inc
+++ b/software/ihu/solar.inc
@@ -40,6 +40,7 @@ sol_calc_power_single
;; sum up all currents -> SOL_CALC_0:2
sol_sum_current
movf INDF,w
+ bcf STATUS,C
addwf SOL_CALC_0,f
btfsc STATUS,C
incf SOL_CALC_1,f
@@ -90,6 +91,7 @@ sol_mula_rotate
;; -------------------------------------
solar_calc_power
+ ;; calc power of power line 1
movlw ADC_SOLAR_C0
movwf FSR
call sol_calc_power_single
@@ -102,11 +104,13 @@ solar_calc_power
movf SOL_CALC_5,w
movwf SOL_CALC_8
+ ;; calc power of power line 2
movlw ADC_SOLAR_C4
movwf FSR
call sol_calc_power_single
;; add SOL_CALC_3:5 to SOL_CALC_6:8 -> SOL_CALC_6:8
+ bcf STATUS,C
movf SOL_CALC_3,w
addwf SOL_CALC_6,f
movlw .1