mirror of
https://github.com/euphy/polargraphcontroller
synced 2025-01-09 03:34:25 +01:00
#14 Serial port now choosable
This commit is contained in:
parent
7da0e7e378
commit
d74881f2de
@ -38,8 +38,7 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
|
|||||||
|
|
||||||
sl.addItem("No serial connection", -1);
|
sl.addItem("No serial connection", -1);
|
||||||
|
|
||||||
String[] ports = {"a", "b", "c", "d", "e", "f", "g", "h"};
|
String[] ports = Serial.list();
|
||||||
//Serial.list();
|
|
||||||
|
|
||||||
for (int i = 0; i < ports.length; i++) {
|
for (int i = 0; i < ports.length; i++) {
|
||||||
println("Adding " + ports[i]);
|
println("Adding " + ports[i]);
|
||||||
@ -61,8 +60,8 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
|
|||||||
|
|
||||||
void dropdown_serialPort(int newSerialPort)
|
void dropdown_serialPort(int newSerialPort)
|
||||||
{
|
{
|
||||||
println("In dropdown_serialPort");
|
println("In dropdown_serialPort, newSerialPort: " + newSerialPort);
|
||||||
|
newSerialPort -= 1;
|
||||||
|
|
||||||
|
|
||||||
if (newSerialPort == -2)
|
if (newSerialPort == -2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user