int LaserLED = GetLEDNumber(AS3.Getfieldint(915), AS3.Getfieldint(914));
// Do what you want with it
#Events
int GetLEDNumber(int port, int pin)
{
int LED = -1;
switch (port)
{
case 1:
LED = pin;
break;
case 2:
LED = 68 + pin;
break;
case 3:
LED = 85 + pin;
break;
case 4:
LED = 102 + pin;
break;
case 5:
LED = 119 + pin;
break;
}
return LED;
}
Users browsing this forum: No registered users and 7 guests