public PhidgetMotor(MotorCallback p, int motorIndex = 0) { try { pCallback = p; motoControl = new MotorControl(); m_motorIndex = motorIndex; motoControl.Attach += new AttachEventHandler(motoControl_Attach); motoControl.Detach += new DetachEventHandler(motoControl_Detach); motoControl.Error += new ErrorEventHandler(motoControl_Error); motoControl.CurrentChange += new CurrentChangeEventHandler(motoControl_CurrentChange); motoControl.InputChange += new InputChangeEventHandler(motoControl_InputChange); motoControl.VelocityChange += new VelocityChangeEventHandler(motoControl_VelocityChange); motoControl.BackEMFUpdate += new BackEMFUpdateEventHandler(motoControl_BackEMFUpdate); motoControl.EncoderPositionChange += new EncoderPositionChangeEventHandler(motoControl_EncoderPositionChange); motoControl.SensorUpdate += new SensorUpdateEventHandler(motoControl_SensorUpdate); NewMaxLength = 0; NewMinLength = 0; openCmdLine(motoControl); } catch (Exception err) { throw (new SystemException(err.Message)); } }
public GojiMotor(MotorCallback p, int motorIndex = 0) : base(p, motorIndex) { }
public MotorSimulator(MotorCallback p, int motorIndex = 0) : base(p, motorIndex) { }