Skip to content

Commit d74881f

Browse files
committed
#14 Serial port now choosable
1 parent 7da0e7e commit d74881f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

SerialPortWindow.pde

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
3838

3939
sl.addItem("No serial connection", -1);
4040

41-
String[] ports = {"a", "b", "c", "d", "e", "f", "g", "h"};
42-
//Serial.list();
41+
String[] ports = Serial.list();
4342

4443
for (int i = 0; i < ports.length; i++) {
4544
println("Adding " + ports[i]);
@@ -61,8 +60,8 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
6160

6261
void dropdown_serialPort(int newSerialPort)
6362
{
64-
println("In dropdown_serialPort");
65-
63+
println("In dropdown_serialPort, newSerialPort: " + newSerialPort);
64+
newSerialPort -= 1;
6665

6766

6867
if (newSerialPort == -2)

0 commit comments

Comments
 (0)