1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

Add BoardPort copy constructor

This commit is contained in:
PaulStoffregen 2018-09-28 18:01:37 -07:00 committed by Cristian Maglie
parent f81798badf
commit f5bf6e5e7a

View File

@ -47,6 +47,18 @@ public class BoardPort {
this.prefs = new PreferencesMap(); this.prefs = new PreferencesMap();
} }
public BoardPort(BoardPort bp) {
prefs = new PreferencesMap();
// TODO: copy bp.prefs to prefs
address = bp.address;
protocol = bp.protocol;
boardName = bp.boardName;
vid = bp.vid;
pid = bp.pid;
iserial = bp.iserial;
label = bp.label;
}
public String getAddress() { public String getAddress() {
return address; return address;
} }