Skip to content

Commit 26990cc

Browse files
committed
Changed default settings and more explaining error messages
1 parent 22be75d commit 26990cc

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
},
300300
"picowgo.rebootAfterUpload": {
301301
"type": "boolean",
302-
"default": true,
302+
"default": false,
303303
"title": "Reboot after upload",
304304
"description": "Reboots your board after any upload action.",
305305
"order": 11

src/settings.mts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Memento, WorkspaceConfiguration, workspace } from "vscode";
1+
import { Memento, WorkspaceConfiguration, window, workspace } from "vscode";
22
import { PyboardRunner } from "@paulober/pyboard-serial-com";
33
import { getProjectPath } from "./api.mjs";
44
import { join } from "path";
@@ -71,10 +71,21 @@ export default class Settings {
7171
}
7272
} catch (e) {
7373
console.error(e);
74+
window.showErrorMessage(
75+
"Error while reading (COM) ports for autoConnect: " + e
76+
);
7477
}
7578
}
7679

77-
return this.getString(SettingsKey.manualComDevice);
80+
let manualComDevice = this.getString(SettingsKey.manualComDevice);
81+
if (manualComDevice === undefined || manualComDevice === "") {
82+
manualComDevice = undefined;
83+
window.showErrorMessage(
84+
"autoConnect setting has been disabled (or no Pico has been found automatically) but no manualComDevice has been set."
85+
);
86+
}
87+
88+
return manualComDevice;
7889
}
7990

8091
/**

0 commit comments

Comments
 (0)