Hey I'm new here.
I also have a problem with "Serial.list".
Applet starts up very slowly (30sec). It seems to be due to this code (1).
I also have a problem with "Serial.list".
Applet starts up very slowly (30sec). It seems to be due to this code (1).
- for(int z = 0; z < Serial.list().length; z++){
String pn = shortifyPortName(Serial.list()[z], 13);
if (pn.length() > 0 )
comListbox.addItem(pn, z); // addItem(name,value)
{
comListMax = z;
}
} - String shortifyPortName(String portName, int maxlen)
{
String shortName = portName;
if(shortName.startsWith("/dev/")) shortName = shortName.substring(5);
if(shortName.startsWith("tty.")) shortName = shortName.substring(4); // get rid of leading tty. part of device name
if(portName.length()>maxlen) shortName = shortName.substring(0,(maxlen-1)/2) + "~" +shortName.substring(shortName.length()-(maxlen-(maxlen-1)/2));
if(shortName.startsWith("cu.")) shortName = "";// only collect the corresponding tty. devices
text("InitSerial - "+shortName, 300, 550);
return shortName;
}
I use Processing 2.0b8 32bit
Eclipse Juno 32bit
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
OS Windows 7 64bit
Does anyone have a tip for me? On the 32bit labtop the problem does not occur.
Best Regards Willi
Eclipse Juno 32bit
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
OS Windows 7 64bit
Does anyone have a tip for me? On the 32bit labtop the problem does not occur.
Best Regards Willi