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 {
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 );
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments