Hallo

So kann ich das Fehler- und Warnungsfrei kompilieren:

Code:
# include <asuro.h>

void sleep_ms(int ms)
{
	while(ms>0)
	{
		Sleep(72);
		ms--;
	}
}

void rechts_daneben (void)
{
	BackLED(OFF,ON);
	MotorSpeed(0,120);
	sleep_ms(1000);
	//MotorSpeed (120,120);
	BackLED(OFF,OFF);
}

void links_daneben (void)
{
	BackLED(ON,OFF);
	MotorSpeed(120,0);
	sleep_ms(1000);
	//MotorSpeed(120,120);
	BackLED(OFF,OFF);
}

int main (void)
{
	unsigned int data [2];
	Init();
	MotorDir(RWD,RWD);
	MotorSpeed(120,120);
	FrontLED(ON);
	while(1)
	{
		LineData(data);
		if (data[0]!=data[1])
		{
			if (data[0]>data[1])
			{
				rechts_daneben();
			}
			else /*(data[0]<data[1])*/
			{
				links_daneben();
			}
		}
		else
		{
			MotorDir(RWD,RWD);
			MotorSpeed(120,120);
			BackLED(OFF,OFF);
		}
		LineData(data);
	}
}
Änderungen:

Sleep(72);
ms--;

und

int main (void)

Das # include <asuro.h> funktioniert bei mir mit den <> nicht, ich brauche die "" (Libversion 2.3)

Gruß

mic