diff --git a/pxtarget.json b/pxtarget.json index a71fec58..9e16d6ed 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -75,7 +75,13 @@ }, "simulator": { "autoRun": true, - "aspectRatio": 0.69 + "aspectRatio": 1.22, + "partsAspectRatio": 0.69, + "builtinParts": { + "accelerometer": true, + "buttonpair": true, + "ledmatrix": true + } }, "compileService": { "yottaTarget": "bbc-microbit-classic-gcc", @@ -136,4 +142,4 @@ "userVoiceApiKey": "WEkkIGaj1WtJnSUF59iwaA", "userVoiceForumId": 402381 } -} +} \ No newline at end of file diff --git a/sim/visuals/boardhost.ts b/sim/visuals/boardhost.ts index 8cb9c0c8..1a4c4b8a 100644 --- a/sim/visuals/boardhost.ts +++ b/sim/visuals/boardhost.ts @@ -14,16 +14,16 @@ namespace pxsim.visuals { constructor(state: DalBoard, boardDef: BoardDefinition, cmpsList: string[], cmpDefs: Map, fnArgs: any) { this.state = state; let onboardCmps = boardDef.onboardComponents || []; - let activeComponents = cmpsList.filter(c => onboardCmps.indexOf(c) < 0); + let activeComponents = (cmpsList || []).filter(c => onboardCmps.indexOf(c) < 0); activeComponents.sort(); - if (boardDef.visual === "microbit") { + // if (boardDef.visual === "microbit") { this.boardView = new visuals.MicrobitBoardSvg({ runtime: runtime, theme: visuals.randomTheme(), disableTilt: false }); - } else { + // } else { //TODO: port Arduino/generic board // this.boardView = new visuals.GenericBoardSvg({ // boardDef: boardDef, @@ -32,7 +32,7 @@ namespace pxsim.visuals { // runtime: runtime, // fnArgs: fnArgs // }) - } + // } const VIEW_WIDTH = "100%"; const VIEW_HEIGHT = "100%";