changeset 317:7b64c0ba6a7e new_screen_layout

VSIbar #3c: extra steps to keep calculation clear
author janos_kovacs <kovjanos@gmail.com>
date Thu, 11 Jun 2015 13:40:14 +0100
parents c6c934f05b42
children 6d8c82fe5a01
files src/tft_outputs.asm
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tft_outputs.asm	Wed Jun 10 22:47:38 2015 +0100
+++ b/src/tft_outputs.asm	Thu Jun 11 13:40:14 2015 +0100
@@ -1005,6 +1005,7 @@
     ;bra     TFT_velocity_VSIbar_com
 
 TFT_velocity_VSIbar_com:
+    clrf    divB
     ; multiply
     movff   divA+0,xA+0
     clrf    xA+1
@@ -1014,8 +1015,10 @@
     movlw   .1
     cpfslt  xC+3
     bra     TFT_velocity_VSIbar_max
+    movlw   .1
     cpfslt  xC+2
     bra     TFT_velocity_VSIbar_max
+    movlw   .1
     cpfslt  xC+1
     bra     TFT_velocity_VSIbar_max
     ; add offset
@@ -1097,6 +1100,7 @@
     cpfsgt  divA+0
     bra     TFT_velocity_VSIbar_desc_clr
 
+    clrf    divB
     ; Desc uses a single multiplier/offset value: *1 / +3
     movlw   .1
     movff   WREG,sub_b+0    ; multiplier
@@ -1111,8 +1115,10 @@
     movlw   .1
     cpfslt  xC+3
     bra     TFT_velocity_VSIbar_desc_max
+    movlw   .1
     cpfslt  xC+2
     bra     TFT_velocity_VSIbar_desc_max
+    movlw   .1
     cpfslt  xC+1
     bra     TFT_velocity_VSIbar_desc_max
     ; add offset