diff --git a/SerialPortWindow.pde b/SerialPortWindow.pde index 09b02a8..98f8d8d 100644 --- a/SerialPortWindow.pde +++ b/SerialPortWindow.pde @@ -31,9 +31,9 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort") .setPosition(10, 10) - .setSize(150, 100) + .setSize(150, 150) .setBarHeight(20) - .setItemHeight(20) + .setItemHeight(16) .plugTo(this, "dropdown_serialPort"); sl.addItem("No serial connection", -1); @@ -61,9 +61,11 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t void dropdown_serialPort(int newSerialPort) { println("In dropdown_serialPort, newSerialPort: " + newSerialPort); + + // No serial in list is slot 0 in code because of list index + // So shift port index by one newSerialPort -= 1; - if (newSerialPort == -2) { }