コード例 #1
0
ファイル: PiCar.cs プロジェクト: rphuang/riot
        public string Initialize(string server, int videoPort)
        {
            Drive    = new MotorClient("motor", Client, this);
            Steering = new ServoClient("servo", Client, this)
            {
                AngleOffset = SteeringOffset
            };
            HeadHorizontalServo = new ServoClient("servoCamH", Client, this);
            HeadVerticalServo   = new ServoClient("servoCamV", Client, this);
            LeftLed             = new RGBLedClient("ledLeft", Client, this);
            RightLed            = new RGBLedClient("ledRight", Client, this);
            StripLed            = new StripLedClient("ledStrip", Client, this);
            Ultrasonic          = new UltrasonicClient("ultrasonic", Client, this);
            DistanceScan        = new DistanceScanClient("scan", Client, this);
            VideoStreamUrl      = string.Format("http://{0}:{1}/{2}", server, videoPort, "");
            string msg = Reset();

            //_connected = Client.LastStatusCode == 200;
            _connected = true;
            return(msg);
        }