private void InitHydraRead() { if (Sixense.Init() == Sixense.SUCCESS) { int attempts = 0; int base_found = 0; while (base_found == 0 && attempts++ < 2) { base_found = Sixense.IsBaseConnected(0); if (base_found == 0) { Thread.Sleep(1000); } } if (base_found == 0) { Sixense.Exit(); throw new Exception("Hydra not attached"); } Sixense.SetActiveBase(0); } else { throw new Exception("Failed to initialize Hydra"); } }
public override void Stop() { if (isReading) { Sixense.Exit(); } }