예제 #1
0
JSValue JSDocument::createTouchList(ExecState* exec)
{
    RefPtr<TouchList> touchList = TouchList::create();

    for (int i = 0; i < exec->argumentCount(); i++)
        touchList->append(toTouch(exec->argument(i)));

    return toJS(exec, globalObject(), touchList.release());
}
void bordercross()
{
	float sec1 = seconds();
	float sec2;
	float sec3;
	claw_up();
	sleep(0.5);
	toTouch(500);
	sleep(0.2);
	reverseT(500, 0.5);
	sleep(1);
	CCW();
	sleep(1);
	forwardT(1000, 3);
	sleep(0.5);
	CCW();
	reverseT(500, 1);
	sec2 = seconds();
	sec3 = sec2 - sec1;
	while (sec3 < 15)
	{
		sec2 = seconds();
		sec3 = sec2 - sec1;
	}
	beep();
	forwardT(1000, 6);
	sleep(0.3);
	claw_down();
	sleep(1);
	if(IR_left > threshold && IR_right > threshold)
	{
		while (1)
		{
			ao();
		}
	}
	sleep(1);
	claw_up();
	sleep(0.5);
	reverseT(500, 1.5);
	sleep(1);
}