public void ConenctPingStream(PingStream pingStream) { _pingStream = pingStream; ThreadStart delagateDetect = new ThreadStart(ThreadDetect); Thread threadDetect = new Thread(delagateDetect); // Start Obsticle detection thread threadDetect.Start(); }
private void Form1_Load(object sender, EventArgs e) { DriveTrain driveTrain = new DriveTrain(); driveTrain.ConnectFour(motor1, motor2); IPing ping = new xPing1(); PingStream pingStream = new PingStream(ping); pingStream.PingList = new xPingList1(); Captain captain = new Captain(); captain.ConnectDriveTrain(driveTrain); captain.ConenctPingStream(pingStream); }