processing / processing/processing4
Serial.list() doesn't update items after a port gets disconnected
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 494
- Fork
- 183
- Merge trung bình
- 4 giờ 39 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với Processing sketch được cung cấp và điểm vào Serial.list(), đồng thời ngắt kết nối COM5 trong khi kết nối đang hoạt động. Theo dõi cách thư viện serial phát hiện và làm mới các cổng; hoàn tất khi Serial.list() không còn bao gồm một cổng đã bị ngắt kết nối mà không cần serial.stop().
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- desktop
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100