#include "../h/rccl.h"
#include "../h/umac.h"

pumatask()
{
	TRSF_PTR z, e , b1, b2, b3;
	POS_PTR  p1, p2, p3;
	int q;

	z = gentr_rot("Z",  0.,  0., 864., zunit, 0.); /* at the base */
	e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);/* finger tips */
	b1 = gentr_pao("B1", 100. , 600.,  300., 0., 0., -1., 0., 1., 0.);
	b2 = gentr_pao("B2", 200. , 500.,  200., 0., 0., -1., 0., 1., 0.);
	b3 = gentr_pao("B3", 300. , 400.,  100., 0., 0., -1., 0., 1., 0.);

	p1   = makeposition("P1" , z, t6, e, EQ, b1, TL, e);
	p2   = makeposition("P2" , z, t6, e, EQ, b2, TL, e);
	p3   = makeposition("P3" , z, t6, e, EQ, b3, TL, e);


	movecart(p1, 300, 2000);
	for (; ; ) {
		QUERY(q); if (q == 'n') break;
		movecart(p2, 300, 1000);
		QUERY(q); if (q == 'n') break;
		movecart(p1, 300, 1000);
		QUERY(q); if (q == 'n') break;
		movecart(p3, 300, 1000);
	}
	movecart(park, 300, 2000);
	printf("END\n");
}
