int main( void )
{
	controller_reset( "localhost", 2002 );
	controller_set( 0, 0, -5, 0 );

	while( 1 )
	{
		double			north;
		double			east;
		double			down;
		double			roll;
		double			pitch;
		double			yaw;

		int			rc;

		rc = controller_step(
			&north,
			&east,
			&down,
			&roll,
			&pitch,
			&yaw
		);

		if( rc == 0 )
			continue;
		if( rc < 0 )
			break;

		fprintf( stderr,
			"(%2.3f,%2.3f,%2.3f,%2.3f)\r",
			north,
			east,
			down,
			yaw
		);
	}

	fprintf( stderr, "\n" );
	return 0;
}
Example #2
0
static void loop_full(TinBot* tinbot) {
    controller_step(&tinbot->controller, &tinbot->sens);
}
Example #3
0
static void loop_pathfin(TinBot* tinbot) {
    tinbot->sens.victim_attached = 1;
    controller_step(&tinbot->controller, &tinbot->sens);
}