processing / processing/processing4

Serial.list() doesn't update items after a port gets disconnected

オープン
#1,258 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
494
フォーク
183
平均マージ
4時間 39分
マージ済み PR(30日)
3

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、アクティブな接続中に COM5 を切断し、提供された Processing スケッチと Serial.list() エントリーポイントを使って問題を再現します。シリアルライブラリがポートを検出して更新する仕組みを追跡します。Serial.list() が serial.stop() を必要とせずに切断されたポートを含まなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
desktop
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。