Skip to content

Commit 6fcb52f

Browse files
authored
Merge pull request #670 from Sloeber/fix_upload_problems
Fix upload problems
2 parents abae483 + 7e3f808 commit 6fcb52f

35 files changed

+1063
-641
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Arduino is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*
18+
* As a special exception, you may use this file as part of a free software
19+
* library without restriction. Specifically, if other files instantiate
20+
* templates or use macros or inline functions from this file, or you compile
21+
* this file and link it with other files to produce an executable, this
22+
* file does not by itself cause the resulting executable to be covered by
23+
* the GNU General Public License. This exception does not however
24+
* invalidate any other reasons why the executable file might be covered by
25+
* the GNU General Public License.
26+
*
27+
* Copyright 2013 Arduino LLC (http://www.arduino.cc/)
28+
*/
29+
30+
package cc.arduino.packages;
31+
32+
@SuppressWarnings({ "unqualified-field-access", "nls" })
33+
public class BoardPort {
34+
35+
private String address;
36+
private String protocol;
37+
private String boardName;
38+
private String vid;
39+
private String pid;
40+
private String iserial;
41+
private String label;
42+
private boolean online;
43+
44+
public BoardPort() {
45+
}
46+
47+
public String getAddress() {
48+
return address;
49+
}
50+
51+
public void setAddress(String address) {
52+
this.address = address;
53+
}
54+
55+
public String getProtocol() {
56+
return protocol;
57+
}
58+
59+
public void setProtocol(String protocol) {
60+
this.protocol = protocol;
61+
}
62+
63+
public String getBoardName() {
64+
return boardName;
65+
}
66+
67+
public void setBoardName(String boardName) {
68+
this.boardName = boardName;
69+
}
70+
71+
public void setLabel(String label) {
72+
this.label = label;
73+
}
74+
75+
public String getLabel() {
76+
return label;
77+
}
78+
79+
public void setOnlineStatus(boolean online) {
80+
this.online = online;
81+
}
82+
83+
public boolean isOnline() {
84+
return online;
85+
}
86+
87+
public void setVIDPID(String vid, String pid) {
88+
this.vid = vid;
89+
this.pid = pid;
90+
}
91+
92+
public String getVID() {
93+
return vid;
94+
}
95+
96+
public String getPID() {
97+
return pid;
98+
}
99+
100+
public void setISerial(String iserial) {
101+
this.iserial = iserial;
102+
}
103+
104+
public String getISerial() {
105+
return iserial;
106+
}
107+
108+
@Override
109+
public String toString() {
110+
return this.address + "_" + this.vid + "_" + this.pid;
111+
}
112+
}
Lines changed: 65 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,73 @@
1+
/*
2+
* This file is part of Arduino.
3+
*
4+
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
5+
*
6+
* Arduino is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation; either version 2 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program; if not, write to the Free Software
18+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*
20+
* As a special exception, you may use this file as part of a free software
21+
* library without restriction. Specifically, if other files instantiate
22+
* templates or use macros or inline functions from this file, or you compile
23+
* this file and link it with other files to produce an executable, this
24+
* file does not by itself cause the resulting executable to be covered by
25+
* the GNU General Public License. This exception does not however
26+
* invalidate any other reasons why the executable file might be covered by
27+
* the GNU General Public License.
28+
*/
29+
130
package cc.arduino.packages.ssh;
231

332
import com.jcraft.jsch.UserInfo;
433

34+
@SuppressWarnings({ "unqualified-field-access" })
535
public class NoInteractionUserInfo implements UserInfo {
636

7-
private final String password;
8-
9-
public NoInteractionUserInfo(String password) {
10-
this.password = password;
11-
}
12-
13-
@Override
14-
public String getPassword() {
15-
return this.password;
16-
}
17-
18-
@Override
19-
public boolean promptYesNo(String str) {
20-
return true;
21-
}
22-
23-
@Override
24-
public String getPassphrase() {
25-
return this.password;
26-
}
27-
28-
@Override
29-
public boolean promptPassphrase(String message) {
30-
return true;
31-
}
32-
33-
@Override
34-
public boolean promptPassword(String message) {
35-
return true;
36-
}
37-
38-
@Override
39-
public void showMessage(String message) {
40-
// no code needed here
41-
}
37+
private final String password;
38+
39+
public NoInteractionUserInfo(String password) {
40+
this.password = password;
41+
}
42+
43+
@Override
44+
public String getPassword() {
45+
return password;
46+
}
47+
48+
@Override
49+
public boolean promptYesNo(String str) {
50+
return true;
51+
}
52+
53+
@Override
54+
public String getPassphrase() {
55+
return password;
56+
}
57+
58+
@Override
59+
public boolean promptPassphrase(String message) {
60+
return true;
61+
}
62+
63+
@Override
64+
public boolean promptPassword(String message) {
65+
return true;
66+
}
67+
68+
@Override
69+
public void showMessage(String message) {
70+
//
71+
}
4272

4373
}

0 commit comments

Comments
 (0)