⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testnewton.java

📁 一个多机器人的仿真平台
💻 JAVA
字号:
/* * testNewton.java */package EDU.gatech.cc.is.newton;/**<B>Introduction</B><BR>This application is for testing the lowest level java newton  interface.<P>To run this program, first ensure you are in the correct directory (wherethe testNewton.class file is), then type "java testNewton".@author (c)1997 Tucker Balch, All Rights Reserved@version July 1997@see Newton*/public class testNewton	{	/**	This method is for testing the newton native interface.	*/	public static void main(String[] args)		{		try			{			System.out.println("main: Opening connection to newton");			Newton newt = new Newton(3, 38400);//ttyc			while(true)				{				int[] X;				int[] Y;				int[] Area;				int   num;							newt.read_frame();				num = newt.getNumVis(newt.CHANNEL_A);				X = new int[num];				Y = new int[num];				Area = new int[num];				newt.getX(newt.CHANNEL_A,X);				newt.getY(newt.CHANNEL_A,Y);				newt.getArea(newt.CHANNEL_A,Area);				System.out.println("------");				for (int i=0; i<num; i++)					System.out.println(X[i]+" "+Y[i]+" "+Area[i]);				}			}		catch (Exception e)			{			System.out.println(e);			}		}		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -