public JacoArm(string key) { m_IsEnabled = false; m_State = new JacoArmState(); m_Cmd = new CJoystickValue(); try { CCypherMessage pass = Crypto.GetInstance().Encrypt(key); m_Arm = new CJacoArm(pass); Console.WriteLine("Wrapper initialized."); if (m_Arm.JacoIsReady()) { m_Arm.ControlManager.StartControlAPI(); // Init sequence, place the arm in READY position. InitSequence(); Console.WriteLine("The arm is ready."); m_IsEnabled = true; } else { Console.WriteLine("The arm is not ready!"); m_IsEnabled = false; } } catch (Exception e) { System.Console.WriteLine( "JACO API initialisation failed. Reason: "); System.Console.WriteLine(e.ToString()); m_IsEnabled = false; } // 200 ms delay. m_WatchDogDelay = new TimeSpan(0, 0, 0, 0, 200); }
public JacoArm(string key) { m_IsEnabled = false; m_State = new JacoArmState(); m_Cmd = new CJoystickValue(); try { CCypherMessage pass = Crypto.GetInstance().Encrypt(key); m_Arm = new CJacoArm(pass); Console.WriteLine("Wrapper initialized."); if (m_Arm.JacoIsReady()) { m_Arm.ControlManager.StartControlAPI(); // Init sequence, place the arm in READY position. InitSequence(); Console.WriteLine("The arm is ready."); m_IsEnabled = true; } else { Console.WriteLine("The arm is not ready!"); m_IsEnabled = false; } } catch (Exception e) { System.Console.WriteLine( "JACO API initialisation failed. Reason: "); System.Console.WriteLine(e.ToString()); m_IsEnabled = false; } // 200 ms delay. m_WatchDogDelay = new TimeSpan(0,0,0,0,200); }