processing / processing/processing4
Serial.list() doesn't update items after a port gets disconnected
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 494
- Forks
- 183
- Ø Merge
- 4 Std. 39 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
Issue description
if conncted to a port say "COM5". if "COM5" is disconncted for any reason, the serial.list() will still show that "COM5" exists even if connction is stopped using serial.stop() after getting "COM5" device disconncted.
again, if conncted to port "COM5" for instance, if connection is stopped using serial.stop() and then if "COM5" device is disconnceted, serial.list() will then update its element and "COM5" isn't there anymore. which is a normal behavior.
test code to varify this issue
import processing.serial.*;
Serial comPort;
void setup() {
size(500, 400);
surface.setTitle("TEST");
comPort = new Serial(this, "COM5", 115200);
background(150);
frameRate(60);
}
void draw() {
background(150);
println(Serial.list().length);
}
check for number of serial ports exists first and then try disconncting the device
Serial.list().length will still show that port was not removed...
URL(s) of affected page(s)
Proposed fix
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem mit der bereitgestellten Processing-Skizze und dem Einstiegspunkt Serial.list() zu reproduzieren, während COM5 während einer aktiven Verbindung getrennt wird. Verfolge, wie die serielle Bibliothek Ports erkennt und aktualisiert; fertig ist die Aufgabe, wenn Serial.list() einen getrennten Port nicht mehr enthält, ohne dass serial.stop() erforderlich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- desktop
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100