File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ public class MonitorFactory {
37
37
38
38
public AbstractMonitor newMonitor (BoardPort port ) {
39
39
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
+ }
41
47
}
42
48
43
49
return new SerialMonitor (port );
Original file line number Diff line number Diff line change @@ -2318,6 +2318,12 @@ public void handleSerial() {
2318
2318
}
2319
2319
2320
2320
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
+
2321
2327
Base .setIcon (serialMonitor );
2322
2328
2323
2329
// If currently uploading, disable the monitor (it will be later
You can’t perform that action at this time.
0 commit comments