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.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/software/ihu/solar.inc b/software/ihu/solar.inc
index 484a538..3c7134e 100644
--- a/software/ihu/solar.inc
+++ b/software/ihu/solar.inc
@@ -61,14 +61,19 @@ sol_mula_vc
btfss SOL_CALC_9,0
goto sol_mula_rotate
+ bcf STATUS,C
movf SOL_CALC_0,w
addwf SOL_CALC_3,f
- movlw .1
btfss STATUS,C
+ goto sol_mula_vc1
+ bcf STATUS,C
+ movlw .1
addwf SOL_CALC_4,f
btfsc STATUS,C
incf SOL_CALC_5,f
+sol_mula_vc1
+ bcf STATUS,C
movf SOL_CALC_1,w
addwf SOL_CALC_4,f
btfsc STATUS,C
@@ -113,12 +118,15 @@ solar_calc_power
bcf STATUS,C
movf SOL_CALC_3,w
addwf SOL_CALC_6,f
- movlw .1
btfss STATUS,C
+ goto solar_calc_power1
+ bcf STATUS,C
+ movlw .1
addwf SOL_CALC_7,f
btfsc STATUS,C
incf SOL_CALC_8,f
+solar_calc_power1
movf SOL_CALC_4,w
addwf SOL_CALC_7,f
btfsc STATUS,C
@@ -133,6 +141,7 @@ solar_calc_power
rlf SOL_CALC_8,f
;; if(SOL_CALC_6 & 0x80) SOL_CALC_7:8+=1
+ bcf STATUS,C
movlw .1
btfsc SOL_CALC_6,7
addwf SOL_CALC_7,f