summaryrefslogtreecommitdiff
path: root/software/ihu/solar.inc
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-01-04 03:23:17 +0000
committerChristian Pointner <equinox@mur.at>2012-01-04 03:23:17 +0000
commit722d539ab6f89018657faaaec1778b086c395e7a (patch)
tree322f0e5013925115859815db78fabd4df8a6c796 /software/ihu/solar.inc
parentfirst solar power calc tests (diff)
solar power calculations work now
git-svn-id: https://svn.spreadspace.org/mur.sat@231 7de4ea59-55d0-425e-a1af-a3118ea81d4c
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