Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit deecdf2

Browse files
elektronikworkshopadiazulay
authored andcommitted
Changed Serial.updatePortListStatus to make use of optional argument to eliminate updatePortListStatus(null) calls
1 parent cdf9f34 commit deecdf2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/serialmonitor/serialMonitor.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ export class SerialMonitor implements vscode.Disposable {
7272
this._baudRateStatusBar.command = "arduino.changeBaudRate";
7373
this._baudRateStatusBar.tooltip = "Baud Rate";
7474
this._baudRateStatusBar.text = defaultBaudRate.toString();
75-
this.updatePortListStatus(null);
75+
this.updatePortListStatus();
7676

7777
const dc = DeviceContext.getInstance();
7878
dc.onChangePort(() => {
79-
this.updatePortListStatus(null);
79+
this.updatePortListStatus();
8080
});
8181
}
8282
public get initialized(): boolean {
@@ -210,8 +210,7 @@ export class SerialMonitor implements vscode.Disposable {
210210
}
211211
}
212212

213-
// TODO EW: use default value for port function parameter and change all updatePortListStatus(null) calls accordingly
214-
private updatePortListStatus(port: string) {
213+
private updatePortListStatus(port?: string) {
215214
const dc = DeviceContext.getInstance();
216215
if (port) {
217216
dc.port = port;

0 commit comments

Comments
 (0)