File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 2121 - name : Install Dependencies
2222 run : |
2323 npm install -g npm
24+ npm -v
2425 npm i -g @vscode/vsce ovsx
2526 npm ci
2627 - name : Lint Extension
Original file line number Diff line number Diff line change 4343 - name : Install Dependencies
4444 run : |
4545 npm install -g npm
46+ npm -v
4647 npm ci
4748 pip install requests js2py
4849 - name : Generate Cache JSON
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ import State from "../state.mjs";
3131import { unknownErrorToString } from "../utils/errorHelper.mjs" ;
3232import { SWITCH_BOARD } from "./cmdIds.mjs" ;
3333import { zephyrTouchTasksJson } from "../utils/setupZephyr.mjs" ;
34+ import {
35+ ZEPHYR_PICO ,
36+ ZEPHYR_PICO2 ,
37+ ZEPHYR_PICO2_W ,
38+ ZEPHYR_PICO_W ,
39+ } from "../models/zephyrBoards.mjs" ;
3440
3541interface IBoardFile {
3642 [ key : string ] : string ;
@@ -261,7 +267,21 @@ export default class SwitchBoardCommand extends Command {
261267 const board = stringToZephyrBoard ( boardRes [ 0 ] ) ;
262268 const taskJsonFile = Uri . joinPath ( wsf . uri , ".vscode" , "tasks.json" ) ;
263269 await zephyrTouchTasksJson ( taskJsonFile , board ) ;
264- this . _ui . updateBoard ( board ) ;
270+
271+ // TODO: duplicate code with extension move into helper
272+ if ( board !== undefined ) {
273+ if ( board === ZEPHYR_PICO2_W ) {
274+ this . _ui . updateBoard ( "Pico 2W" ) ;
275+ } else if ( board === ZEPHYR_PICO2 ) {
276+ this . _ui . updateBoard ( "Pico 2" ) ;
277+ } else if ( board === ZEPHYR_PICO_W ) {
278+ this . _ui . updateBoard ( "Pico W" ) ;
279+ } else if ( board === ZEPHYR_PICO ) {
280+ this . _ui . updateBoard ( "Pico" ) ;
281+ } else {
282+ this . _ui . updateBoard ( "Other" ) ;
283+ }
284+ }
265285 }
266286
267287 private async _switchBoardPicoSDK (
You can’t perform that action at this time.
0 commit comments