Skip to content

Commit

Permalink
Some basic changes
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Mar 21, 2024
1 parent 419615c commit f4c56c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/activator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ export default class Activator {
//this.ui?.refreshState(true);
this.logger.info("Connection to wrapper successfully established");
void vscode.window.showInformationMessage(
"Connection to Pico established."
"Connection to board established."
);

return;
Expand Down
24 changes: 13 additions & 11 deletions src/stubs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,21 @@ export async function installIncludedStubs(): Promise<void> {
);
}

const STUB_PORTS = [
"micropython-rp2-rpi_pico_w-stubs",
"micropython-rp2-rpi_pico-stubs",
"micropython-esp32-stubs",
];
enum StubPorts {
picoW = "micropython-rp2-rpi_pico_w-stubs",
pico = "micropython-rp2-rpi_pico-stubs",
esp32 = "micropython-esp32-stubs",
}

const STUB_PORTS: string[] = [StubPorts.picoW, StubPorts.pico, StubPorts.esp32];

export function stubPortToDisplayString(port: string): string {
switch (port) {
case "micropython-rp2-rpi_pico_w-stubs":
case StubPorts.picoW as string:
return "RPi Pico (W)";
case "micropython-rp2-rpi_pico-stubs":
case StubPorts.pico as string:
return "RPi Pico";
case "micropython-esp32-stubs":
case StubPorts.esp32 as string:
return "ESP32";
default:
return port;
Expand All @@ -254,11 +256,11 @@ export function stubPortToDisplayString(port: string): string {
export function displayStringToStubPort(displayString: string): string {
switch (displayString) {
case "RPi Pico (W)":
return "micropython-rp2-rpi_pico_w-stubs";
return StubPorts.picoW;
case "RPi Pico":
return "micropython-rp2-rpi_pico-stubs";
return StubPorts.pico;
case "ESP32":
return "micropython-esp32-stubs";
return StubPorts.esp32;
default:
return displayString;
}
Expand Down

0 comments on commit f4c56c9

Please sign in to comment.