def hat(self, value): #code here if value == (1, 0): send("forwardMini=1") elif value == (-1, 0): send("backMini=1") elif value == (0, 0): send("stopMini=1") elif value == (0, 1): send("openMiniArm=1") elif value == (0, -1): send("closeMiniArm=1")
def calcSpeed(x, y): b = (y * cos(120) / sin(120) + x) / (cos(60) - cos(120) / sin(120)) * 170 a = (-b * sin(60) + y) / sin(120) * 170 a1 = a a2 = -a b1 = b b2 = -b send("a1=" + str(a1)) send("a2=" + str(a2)) send("b1=" + str(b1)) send("b2=" + str(b2)) print("a: " + str(a) + " b: " + str(b))
def cam(y): if y > 0: print(1) send("camUp=1") elif y == 0: print(0) send("camStale=1") else: print(-1) send("camDown=1")
def AnalogR(self): # code here send("LED=" + str(not self.led))
def but10(self): # code here send("connect=1", "connectJoy")
def Select(self): # code here send("stopAll=1")
def Rec(self): # code here send("armRotL=1")
def O(self): # code here send("armRotR=1")
def X(self): # code here send("armOpen=1")
def Tri(self): # code here send("armClose=1")
def but4(self): # code here send("ROVDown=1")
def L2(self): # code here send("ROVDown=1")
def L1(self): # code here send("ROVUp=1")
def R2(self): # code here send("speedDown=1")
def R1(self): # code here send("speedUp=1")