Code: Select all
def update():
global yaw
yaw = freeImu.yaw
global pitch
pitch = freeImu.pitch
global roll
roll = freeImu.roll
if starting:
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = (freeImu.yaw - centerYaw)
pitch = (freeImu.pitch - centerPitch)
roll = (freeImu.roll - centerRoll)
freeImu.update += update
diagnostics.watch(yaw)
diagnostics.watch(pitch)
diagnostics.watch(roll)
hydra[0].joyx = yaw
hydra[0].joyy = roll
if xbox360[0].a:
hydra[0].trigger = 1
if xbox360[0].b:
hydra[1].trigger = 1
Thanks for any help!