Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias Dish d0
- alias ScanSwitch d1
- alias IgnoreSwitch d2
- alias IsEnable r0
- alias IsIgnore r1
- alias Axis r2
- alias Id r3
- alias Power r4
- alias Horiz r5
- alias Vert r6
- alias Step r7
- alias Direction r8
- alias LastPower r9
- alias Temp r10
- alias IgnoreId1 r11
- alias IgnoreId2 r12
- alias IgnoreId3 r13
- alias IgnoreId4 r14
- alias IgnoreId5 r15
- Reset:
- move Axis 0
- move Id 0
- move Power 0
- move Step 4
- move Direction 1
- move LastPower 0
- move IgnoreId1 0
- move IgnoreId2 0
- move IgnoreId3 0
- move IgnoreId4 0
- move IgnoreId5 0
- s Dish Horizontal Horiz
- s Dish Vertical Vert
- Main:
- jal CheckSwitches
- jal ReadValues
- beqz IsEnable Reset
- beqzal IsIgnore Ignore
- beqz Id Searching
- beq Id IgnoreId1 Searching
- beq Id IgnoreId2 Searching
- beq Id IgnoreId3 Searching
- beq Id IgnoreId4 Searching
- beq Id IgnoreId5 Searching
- Homing:
- brge Power LastPower 3 #If Current < Last
- div Step Step 2
- mul Direction Direction -1 #End If
- brlt Power LastPower 4 #If Current > Last
- brge Step 1 3 #And If Step < 1
- nor Axis Axis Axis
- move Step 4 #End If
- sub Temp 1 Power
- mul Temp Temp 30 #Max step 3deg/90% or 1.5deg/95%
- min Step Step Temp
- mul Temp Direction Step
- move LastPower Power
- beqz Axis HomeHorizontal
- HomeVertical:
- add Vert Vert Temp
- brlt Vert 89 3 #If Vert > 89
- move Vert 90
- nor Axis Axis Axis #End If
- brgt Vert 1 3 #If Vert < 1
- move Vert 0
- nor Axis Axis Axis #End If
- s Dish Vertical Vert
- j Main
- HomeHorizontal:
- add Horiz Horiz Temp
- brlt Horiz 359 3 #If Horiz > 359
- move Horiz 360
- nor Axis Axis Axis #End If
- brgt Horiz 1 3 #If Horiz < 1
- move Horiz 0
- nor Axis Axis Axis #End If
- s Dish Horizontal Horiz
- j Main
- Searching:
- move Axis 0
- move Step 4
- move Power 0
- move LastPower 0
- brlt Horiz 359 2 #If Horiz > 359
- move Direction -1 #End If
- brgt Horiz 1 2 #If Horiz < 1
- move Direction 1 #End If
- mul Horiz Direction 180
- add Horiz Horiz 180
- mul Vert Direction 15
- add Vert Vert 45
- s Dish Horizontal Horiz
- s Dish Vertical Vert
- j Main
- CheckSwitches:
- l IsEnable ScanSwitch Setting
- l IsIgnore IgnoreSwitch Setting
- j ra
- ReadValues:
- l Id Dish SignalID
- l Power Dish SignalStrength
- l Horiz Dish Horizontal
- l Vert Dish Vertical
- j ra
- Ignore:
- move IgnoreId5 IgnoreId4
- move IgnoreId4 IgnoreId3
- move IgnoreId3 IgnoreId2
- move IgnoreId2 IgnoreId1
- move IgnoreId1 Id
- s IgnoreSwitch Open 0
- j ra
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement