public override Action Start() { Controller = new Sixense.ControllerData[2]; Controller[0] = new Sixense.ControllerData(); Controller[1] = new Sixense.ControllerData(); Angles = new Sixense.ControllerAngles[2]; Angles[0] = new Sixense.ControllerAngles(); Angles[1] = new Sixense.ControllerAngles(); isReading = false; InitHydraWrite(); return(null); }
//----------------------------------------------------------------------- public override Action Start() { int r = Sixense.Init(); if (r == Sixense.SUCCESS) { int attempts = 0; int base_found = 0; while (base_found == 0 && attempts < 2) { Thread.Sleep(1000); base_found = Sixense.IsBaseConnected(0); } if (base_found == 0) { Sixense.Exit(); throw new Exception("Hydra not attached"); } Controller = new Sixense.ControllerData[2]; Controller[0] = new Sixense.ControllerData(); Controller[1] = new Sixense.ControllerData(); Angles = new Sixense.ControllerAngles[2]; Angles[0] = new Sixense.ControllerAngles(); Angles[1] = new Sixense.ControllerAngles(); r = Sixense.SetActiveBase(0); return(null); } else { throw new Exception("Failed to initialize Hydra"); } }
//----------------------------------------------------------------------- public override Action Start() { int r = Sixense.Init(); if (r == Sixense.SUCCESS) { int attempts = 0; int base_found = 0; while (base_found == 0 && attempts < 2) { Thread.Sleep(1000); base_found = Sixense.IsBaseConnected(0); } if (base_found == 0) { Sixense.Exit(); throw new Exception("Hydra not attached"); } Controller = new Sixense.ControllerData[2]; Controller[0] = new Sixense.ControllerData(); Controller[1] = new Sixense.ControllerData(); Angles = new Sixense.ControllerAngles[2]; Angles[0] = new Sixense.ControllerAngles(); Angles[1] = new Sixense.ControllerAngles(); r = Sixense.SetActiveBase(0); return null; } else throw new Exception("Failed to initialize Hydra"); }