fix folders
14
Buffalo/BuffaloAlarm.yolol
Normal file
@@ -0,0 +1,14 @@
|
||||
if:AlarmOveride==1then:SoundOn=0 :RedLight=0 goto1end
|
||||
if:DurErr>0thenalarm=1 :SndT=8 alm="Durability" goto5elsealarm=0end
|
||||
if:FuelCheck<500thenalarm=1 :SndT=4 alm="Fuel" goto5elsealarm=0end
|
||||
if:Propellant<500thenalarm=1 :SndT=6 alm="Prop" goto5elsealarm=0end
|
||||
:SoundOn=0+alarm ifalarm then:RedLight=1-:RedLight else:Redlight=0end
|
||||
ifalarm!=1then:Info="\nWarpClass: "+:WarpClass goto1 end
|
||||
if alm=="Durability" then alm+=" "+:DurErr end :Info="\n"+alm goto 1
|
||||
|
||||
|
||||
// This replaces the 2 individual alarm chips.
|
||||
// Also change priority on the sound device above seat to 1 and
|
||||
// radius to 50. Also change DurabilityErrors to DurErr on ship
|
||||
// monitor at top of YOLOL rack stack. You can // comment out any
|
||||
// alarms you dont care about (lines 2-4)
|
||||
17
Buffalo/BuffaloApproachOld.yolol
Normal file
@@ -0,0 +1,17 @@
|
||||
// Approach ahead - Mutleyx
|
||||
:Approach=0 :range=0 od=0 oa=0
|
||||
a=:Approach ifa!=oa thenoa=a :range=a end goto3+a
|
||||
d=:RangeAhead ifd!=500thengoto6end
|
||||
:FcuForward=0 :FcuBackward=0 goto3
|
||||
ifd>15 and d<20thengoto9end
|
||||
done=0 cd=17.5-d dx=od-cd od=cd adj=-(cd-4.5*dx) goto15
|
||||
|
||||
:FcuForward=0 :FcuBackward=0
|
||||
done++ ifdone>10then:Approach=0end
|
||||
goto2*:Approach+2
|
||||
|
||||
|
||||
|
||||
ifadj>d thenadj=d end :FcuForward=0 :FcuBackward=0
|
||||
ifadj<0then:FcuBackward=-adj*4else:FcuForward=adj*0.15end
|
||||
if:Approach thengoto4elsegoto9end
|
||||
14
Buffalo/BuffaloApproachPID.yolol
Normal file
@@ -0,0 +1,14 @@
|
||||
s=15 Kp=0.28 Ki=0.01 Kd=4 t=1.25 m=1000 g=1/m p=0 goto1+:Approach>0
|
||||
r=:RFD e=r-s d=e-p i+=e/(d-g) i/=2 o=Kp*e+Ki*i+Kd*d p=e r*=r<m
|
||||
z/=:Approach*r*(d*d>g+e*e>1) :FcuForward=o/t :FcuBackward=-o*t goto2
|
||||
:Approach=0 :FcuForward=0 :FcuBackward=0 goto1
|
||||
|
||||
// PID approach uses a proportional-integal-derivative controller to
|
||||
// output FCU values appropriate to the distance and current speed.
|
||||
// It has several tunables:
|
||||
// s (setpoint) the distance we want to get to
|
||||
// Kp (proportional) how much we factor in our current distance
|
||||
// Ki (integral) factor of how long we've been at our distance
|
||||
// Kd (derivative) factor of prediction of where we'll be in future
|
||||
// t (thrust diff) account for disparity in forward/rev thrust power
|
||||
// Credit to Whitestrake
|
||||
7
Buffalo/BuffaloDoors.yolol
Normal file
@@ -0,0 +1,7 @@
|
||||
t=0 timer=40 if :Battery < 2000 then goto4 end
|
||||
if :R_Door+:L_Door then goto3 end goto1
|
||||
if t<timer then t++ goto 3 else :R_Door=0 :L_Door=0 goto1 end
|
||||
:R_Door=1 :L_Door=1 :ENGDoor=1 goto1
|
||||
|
||||
// This replaces the door chip. Set timer to how long you want
|
||||
// doors to stay open before closing.
|
||||
20
Buffalo/BuffaloMinerPositioning.yolol
Normal file
@@ -0,0 +1,20 @@
|
||||
if:Static+:Mine==0thengoto10end
|
||||
if:Static thengoto9end if(:LTCR==18.7)*(:LTCP==-7)thengoto11end goto2
|
||||
if:Static thengoto9end if(:LTCR==18.7)*(:LTCP==0)thengoto12end goto3
|
||||
if:Static thengoto9end if(:LTCR==18.7)*(:LTCP==-14)thengoto13end goto4
|
||||
if:Static thengoto9end if(:LTCR==6.7)*(:LTCP==-14)thengoto14end goto5
|
||||
if:Static thengoto9end if(:LTCR==6.7)*(:LTCP==0)thengoto15end goto6
|
||||
if:Static thengoto9end if(:LTCR==30.7)*(:LTCP==0)thengoto16end goto7
|
||||
if:Static thengoto9end if(:LTCR==30.7)*(:LTCP==-14)thengoto10end goto8
|
||||
goto 10
|
||||
:LTP=-7 :RTP=-7 :LTR=18.7 :RTR=-18.7 :BTR=0 :BTP=-7 goto1 //Default
|
||||
:LTP=0 :RTP=0 :BTP=-14 goto3 //Up
|
||||
:LTP=-14 :RTP=-14 :BTP=0 goto4 //Down
|
||||
:LTR=6.7 :RTR=-30.7 :BTR=12 goto5 //Left
|
||||
:LTP=0 :RTP=0 :BTP=-14 goto6 //Up
|
||||
:LTR=30.7 :RTR=-8.7 :BTR=-12 goto7 //Right
|
||||
:LTP=-14 :RTP=-14 :BTP=0 goto8//Down
|
||||
// :LTY and :RTY are left and right upper turret rotation
|
||||
// :BTP is bottom turret pitch. :Mine is mining button
|
||||
// :Static is static button (so they dont move)
|
||||
// :LTCP/LTCR are current pitch and rotation of left turret
|
||||
13
Buffalo/BuffaloMinerSafety.yolol
Normal file
@@ -0,0 +1,13 @@
|
||||
PPchk=(:BTCP>=-17)*(:BTCP<=3)*(:LTCP>=-15)*(:RTCP>=-15)
|
||||
Rchk=(:LTCR<=40)*(:LTCR>=0)*(:RTCR<=0)*(:RTCR>=-40)
|
||||
:Pchk=(PPchk*Rchk) b="\n"
|
||||
if:Mine then:turtle=10end goto1
|
||||
//Ang=b+"B:"+:BTCR+" "+:BTCP+b
|
||||
//:Ang=Ang+"L:"+:LTCR+" "+:LTCP+b+"R:"+:RTCR+" "+:RTCP+b+"Pchk:"+:Pchk
|
||||
|
||||
// Uncomment the two lines above if you want to see angles on your
|
||||
// turrets on a screen named :Ang. Movce the line 4 below them.
|
||||
// :BTCP is bottom turret current pitch, :LTCP and :RTCP are for
|
||||
// top turrets. :Mine is mine button, :turtle is turtle button
|
||||
// :PChk is store on memory chip (or other device)
|
||||
// This, positioning and Control mining chips replace the original.
|
||||
8
Buffalo/BuffaloNavLight.yolol
Normal file
@@ -0,0 +1,8 @@
|
||||
if:insideSafeZone==0then:Nav_Lights=0 :NavRed=0 :NavGreen=0 goto1end
|
||||
if:Nav_Lights*:insideSafeZone thengoto3elsegoto1end
|
||||
if:insideSafeZone thenift<5thent++ goto3endelsegoto1end
|
||||
t=0 :NavRed=1-:NavRed :NavGreen=1-:NavGreen goto2
|
||||
|
||||
// This replaces the original navlights chip. no new fields.
|
||||
// auto turns off nav lights if you cross in unsafe and doesnt allow
|
||||
// them on while in unsafe.
|
||||
22
Buffalo/BuffaloScanner.yolol
Normal file
@@ -0,0 +1,22 @@
|
||||
a="Valkite" wa=8.08 b="Bastium" wb=wa c="Ajatite" wc=6.31 d="Ice"
|
||||
wd=6.78 e="Vokarium" we=wd f="Nhurgite" wf=wc g="Surtrite" wg=wf
|
||||
h="Charodium" wh=11.25 i="Exorium" wi=14.25 j="Aegisium" wj=7.67
|
||||
k="Arkanium" wk=4.31 l="Karnite" wl=8.08 m="Kutonium" wm=7.36
|
||||
n="Lukium" wn=15.25 o="Corazium" wo=9.95 p="Ymrium" wp=8.78
|
||||
q="Xhalium" wq=wc scn=""
|
||||
r="\n" s=" Ore" t=" Crystal" u=100 v=" Stks" scn=""
|
||||
if:Scanner==0then:Scn="Off"+r+scn goto8end :Scan=1 :Scn="Scan.."+r+scn
|
||||
:ind=0 if:V==0then:Scn="Scan."+r+scn goto8end
|
||||
z=:M-s-t V1=:V/1728 V1=(V1+0.05)/u*u L1=z+r+V1+v goto14
|
||||
:ind=1 z=:M-s-t V2=:V/1728 V2=(V2+0.05)/u*u L2=r+z+r+V2+v goto14
|
||||
P=V2/V1*100 Scn=L1+L2+r+P+"%"+s+r+mt/1000/u*u+" mt" :Scn="Final"+r+scn
|
||||
mt=0 :ind=0 :V=0 goto8
|
||||
:Scn="Calc"+r+scn
|
||||
wt=(z==a)*wa+(z==b)*wb+(z==c)*wc+(z==d)*wd+(z==e)*we+(z==f)*wf
|
||||
wt+=(z==g)*wg+(z==h)*wh+(z==i)*wi+(z==j)*wj+(z==k)*wk+(z==l)*wl
|
||||
wt+=(z==m)*wm+(z==n)*wn+(z==o)*wo+(z==p)*wp+(z==q)*wq
|
||||
mt+=wt*:V goto11+:ind
|
||||
// Scanner is first field name on Button and :Scanner
|
||||
// Scn is first field name of Text Display
|
||||
// On Scanner, rename Volume field to V, Material field to M, and
|
||||
// Index field to ind
|
||||
10
Buffalo/BuffaloTransponder.yolol
Normal file
@@ -0,0 +1,10 @@
|
||||
i=:insideSafeZone :Safezone_B=i
|
||||
if i then :Safe_C=2 else :Safe_C=1 end
|
||||
if i then :Tran_C=2 a=0 b=0 else :Tran_C=1 a=1 end
|
||||
if(not b)*a then :transponder=0 b=1 end
|
||||
if(not a)*b then a=0 end goto1
|
||||
|
||||
// No new button names. Auto turns off transponder if cross into
|
||||
// unsafe. Sets the rectangular button colors based on unsafe.
|
||||
// will allow transponder to be turned back on manually if desired
|
||||
// in unsave.
|
||||
11
Buffalo/BuffalonMineControl.yolol
Normal file
@@ -0,0 +1,11 @@
|
||||
if:Mine*:PChk then:MLT=1-:MLT :CL=1-:CL goto1else:MLT=0 :CL=:COLL end
|
||||
if:PChk==0then:LTP=-7 :RTP=-7 :LTR=18.75 :RTR=-18.75 :BTP=-7end goto1
|
||||
|
||||
|
||||
// :Mine is mining button, :Pchk is on a memory chip or other device
|
||||
// :MLT is the first field on all lasers. :CL is first on collectors
|
||||
// :COLL is collector button.
|
||||
// :RTP, :LTP, :BTP is the first field on the pitch of the turrets
|
||||
// for right, left and bottom lasers.
|
||||
|
||||
// This, Safety and positioning mining chips replace the original.
|
||||
12
Buffalo/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
These files modify or replace existing YOLOL files on a Buffalo for more functionality.
|
||||
Files are commented. Comments are not required to be on the chips of course.
|
||||
|
||||
### Mining System
|
||||
|
||||
The mining system uses 3 basic chips, one for Control, one for Safety and one for Positioning.
|
||||
I sometimes change the positioning, but currently you start with your aim point in middle of rock,
|
||||
lasers will then go up, down, left, up, right, down, center and repeat. At 15m from rock it seems to
|
||||
get most of it.
|
||||
|
||||
You can see the pictures of my installation and of the turrets Rotation and Pitch settings in the
|
||||
images folder here.
|
||||
BIN
Buffalo/images/BottomTurretPitch.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Buffalo/images/BottomTurretRotation.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Buffalo/images/BuffaloFront.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
Buffalo/images/LeftTurretPitch.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Buffalo/images/LeftTurretRotation.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Buffalo/images/RightTurretPitch.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Buffalo/images/RightTurretRotation.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |