Пример #1
0
 public static void StartDebug(Controller c, string portName)
 {
     try
     {
         int       port = 39000 + Convert.ToInt32(portName.Substring(3));
         DebugComm dbg  = new DebugComm(c, port);
         dbg.Start();
     }
     catch { }
 }
Пример #2
0
 public Controller(string portName, bool movement = true, bool servos = true, bool smallBot = false)
 {
     r = new Robot(0, 0, 0, portName, false, smallBot);
     if (!movement)
     {
         r.DisableMovement();
     }
     if (!servos)
     {
         r.DisableServos();
     }
     DebugComm.StartDebug(this, portName);
 }
Пример #3
0
        public Controller(string portName, string strategy, bool movement = true, bool servos = true, bool smallBot = false)
        {
            string path, port;

            ReadConfig(out path, out port);

            portName = (portName == "") ? port : portName;
            r        = new Robot(0, 0, 0, portName, true, smallBot);
            if (!movement)
            {
                r.DisableMovement();
            }
            if (!servos)
            {
                r.DisableServos();
            }

            InitStrategy(strategy);

            DebugComm.StartDebug(this, portName);
        }