Skip to content

Commit 26077e2

Browse files
Merge branch 'pluggable-monitor' of https://github.com/arduino/arduino-ide into pluggable-monitor
2 parents f92f875 + 7daad3b commit 26077e2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

arduino-ide-extension/src/browser/monitor-model.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class MonitorModel implements FrontendApplicationContribution {
3939
this._darkTheme = false;
4040
this._wsPort = 0;
4141
this._serialPort = '';
42-
this._connected = false;
42+
this._connected = true;
4343

4444
this.onChangeEmitter = new Emitter<
4545
MonitorModel.State.Change<keyof MonitorModel.State>

arduino-ide-extension/src/node/monitor-service.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,13 @@ export class MonitorService extends CoreClientAware implements Disposable {
132132
}
133133

134134
if (!this.board?.fqbn || !this.port?.address || !this.port?.protocol) {
135+
this.updateClientsSettings({ monitorUISettings: { connected: false } });
136+
135137
return Status.CONFIG_MISSING;
136138
}
137139

138140
if (this.uploadInProgress) {
141+
this.updateClientsSettings({ monitorUISettings: { connected: false } });
139142
return Status.UPLOAD_IN_PROGRESS;
140143
}
141144

@@ -389,7 +392,10 @@ export class MonitorService extends CoreClientAware implements Disposable {
389392
}
390393

391394
this.updateClientsSettings({
392-
...settings,
395+
monitorUISettings: {
396+
...settings.monitorUISettings,
397+
connected: !!this.duplex,
398+
},
393399
pluggableMonitorSettings: reconciledSettings,
394400
});
395401

0 commit comments

Comments
 (0)