newton_test.c

来自「一个多机器人的仿真平台」· C语言 代码 · 共 55 行

C
55
字号
/* **************************************************************************** *  newton_test.c *  * test the newton interface  *  * David Huggins * June 1997 * * Copyright (c) 1997 Georgia Tech Research Corporation * All Rights Reserved * * ************************************************************************** */#include "newton.h"#include <stdio.h>int main( int argc, char* argv[] ){ int i, status; int    otype;   status = InitNewton( 3 );   if (status == NEWTON_SUCCESS)      printf( "newton_test:InitNewton succeeded\n" );   else   {      printf( "newton_test:InitNewton failed %d\n", status );      exit( NEWTON_FAILURE );   }   while( TRUE )   {//      printf( "main: calling NewtonParse\n");      NewtonParse();      for (otype=0; otype<NUMBER_OF_TYPES; otype++)	{            printf( "Found %d of type %d\n" , NumberFound[otype], otype);            for (i=0; i<NumberFound[otype]; i++)            {               printf( "channel %d - (x %d,y %d ) axis %d area %d\n", 			otype,                        LocalScreenObjects[otype][i].x, 			LocalScreenObjects[otype][i].y,                        LocalScreenObjects[otype][i].axis,                        LocalScreenObjects[otype][i].area );            }	}   }} /* newton_test() */

⌨️ 快捷键说明

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