@name Joy Controller
@inputs [JAna JHat JBut]:wirelink
@outputs 
@persist 
@trigger 

if(JAna:entity()){
    Xaxis=JAna["1",number] #Left stick X
    Yaxis=JAna["2",number] #Left Stick Y
    Xaxis2=JAna["3",number] #Right Stick X
    Yaxis2=JAna["4",number] #Right Stick Y
    Zaxis=JAna["5",number] #Trigger analog (Left down, right up)
    Lstick=JAna["6",number] #Left Stick button
    Rstick=JAna["7",number] #Right stick button
    But9=JAna["8",number] #Center Ring left 
}
if(JHat:entity()){
    HatU=JHat["1",number] #Hat up
    HatD=JHat["2",number] #Hat Down
    HatL=JHat["3",number] #Hat Left
    HatR=JHat["4",number] #Hat Right
    HatC=JHat["5",number] #Hat Centered
    But9=JHat["6",number] #Center Ring Left
    But10=JHat["7",number] #Center Ring Right
    But13=JHat["8",number] #Center Ring Middle
}
if(JBut:entity()){
    But1=JBut["1",number] #Square / 1
    But2=JBut["2",number] #X / 2
    But3=JBut["3",number] #Circle / 3
    But4=JBut["4",number] #Triangle /4
    But5=JBut["5",number] #Left front button
    But6=JBut["6",number] #Right front button
    But7=JBut["7",number] #Left trigger
    But8=JBut["8",number] #Right trigger
}
