Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 97acc9d

Browse files
Disable serial monitor for non-SSH network ports
1 parent 40e7b1d commit 97acc9d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

‎app/src/cc/arduino/packages/MonitorFactory.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ public class MonitorFactory {
3737

3838
public AbstractMonitor newMonitor(BoardPort port) {
3939
if ("network".equals(port.getProtocol())) {
40-
return new NetworkMonitor(port);
40+
if ("yes".equals(port.getPrefs().get("ssh_upload"))) {
41+
// the board is SSH capable
42+
return new NetworkMonitor(port);
43+
} else {
44+
// SSH not supported, no monitor support
45+
return null;
46+
}
4147
}
4248

4349
return new SerialMonitor(port);

‎app/src/processing/app/Editor.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,12 @@ public void handleSerial() {
23182318
}
23192319

23202320
serialMonitor = new MonitorFactory().newMonitor(port);
2321+
2322+
if (serialMonitor == null) {
2323+
statusError(I18n.format(tr("Serial monitor not supported on port {0}"), PreferencesData.get("serial.port")));
2324+
return;
2325+
}
2326+
23212327
Base.setIcon(serialMonitor);
23222328

23232329
// If currently uploading, disable the monitor (it will be later

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /