private void update(String text) { this.label1.Text = text; //Console.WriteLine(++cnt + " " + text); List <long> l1 = UrgPort.getDis(); List <long> l2 = zeroFilter.getFilterData(l1); List <long> l3 = kalmFilter.getFilterData(l2); this.pictureBox1.Image = urgImg.drawRadarImg(l3); // drawCnt++; if (drawCnt == 20) { drawCnt = 0; Smart_Car.Point p = new Smart_Car.Point(); if (drport != null) { p = drport.getPoint(); Console.WriteLine(p.x + " " + p.y); } ropg.updateMap((int)(p.x * 100), (int)(p.y * 100), p.w, l3); this.pictureBox2.Image = opgMap.drawOPGMapFast(ropg.PriMap, ropg.BinMap); } }
/// <summary> /// 获取激光雷达实例 /// </summary> /// <param name="portName"></param> /// <returns></returns> public static UrgPort getInstance(string portName) { if (urgPort == null) { urgPort = new UrgPort(portName); } return(urgPort); }