@name Eye
@inputs Start A B C D E F G H I J K Screen:wirelink
@outputs FPS
@persist T:ranger Ram1:array Ram2:array Count Count2 Focus IPStemp FPStemp

if(!Start) {Focus=75, FPS=0, Ram1=array():clone(), Ram2=array():clone() }
if(Start & Count<1024) {
    Count++, X=(Count%32)*90/32-45, Y=floor(Count/32)*90/32-70, Range=rangerAngle(5000,X,Y):distance(), B=clamp(1.4-Range/Focus,0,1)*255, Ram1:setNumber(Count, B)
    Count++, X=(Count%32)*90/32-45, Y=floor(Count/32)*90/32-70, Range=rangerAngle(5000,X,Y):distance(), B=clamp(1.4-Range/Focus,0,1)*255, Ram1:setNumber(Count, B)
    Count++, X=(Count%32)*90/32-45, Y=floor(Count/32)*90/32-70, Range=rangerAngle(5000,X,Y):distance(), B=clamp(1.4-Range/Focus,0,1)*255, Ram1:setNumber(Count, B)
    Count++, X=(Count%32)*90/32-45, Y=floor(Count/32)*90/32-70, Range=rangerAngle(5000,X,Y):distance(), B=clamp(1.4-Range/Focus,0,1)*255, Ram1:setNumber(Count, B)
}
if(Start & Count2<1024) {
    W=0
    if(!W) { Count2++, B=Ram1:number(Count2), if(Ram2:number(Count2)!=B) { W=1, Screen:writeCell(1023-Count2, B), Ram2:setNumber(Count2, B) } }
    if(!W) { Count2++, B=Ram1:number(Count2), if(Ram2:number(Count2)!=B) { W=1, Screen:writeCell(1023-Count2, B), Ram2:setNumber(Count2, B) } }
    if(!W) { Count2++, B=Ram1:number(Count2), if(Ram2:number(Count2)!=B) { W=1, Screen:writeCell(1023-Count2, B), Ram2:setNumber(Count2, B) } }
    if(!W) { Count2++, B=Ram1:number(Count2), if(Ram2:number(Count2)!=B) { W=1, Screen:writeCell(1023-Count2, B), Ram2:setNumber(Count2, B) } }
}
if(Count>=1024) { Count=0 }
if(Count2>=1024) { Count2=0, FPS=round(1/(curtime()-FPStemp)), FPStemp=curtime() }
