示例#1
0
        public void Do(IRobot robot)
        {
            WaitHandle[] handles = new WaitHandle[2];
            // ------------------------------------
            // main motor rotation
            handles[0] = robot.CreateRotateTask(RobotSetup.XPort, X);

            // -----------------------------------------------------
            // secondary motor rotation
            handles[1] = robot.CreateRotateTask(RobotSetup.YPort, Y);

            // sync motors
            WaitHandle.WaitAll(handles);
        }
示例#2
0
 public void Do(IRobot robot)
 {
     // "eat" paper
     robot.Motors[RobotSetup.YPort].ResetTacho();
     robot.CreateRotateTask(RobotSetup.YPort, Y).WaitOne();
     robot.Motors[RobotSetup.YPort].ResetTacho();
 }