File tree Expand file tree Collapse file tree 3 files changed +2
-221
lines changed
Expand file tree Collapse file tree 3 files changed +2
-221
lines changed Original file line number Diff line number Diff line change 2525 "build" : " npm run build:lib && npm run build:demo" ,
2626 "ci" : " npm run build:lib && npm run test && npx prettier --check lib src" ,
2727 "test" : " vitest" ,
28- "preview" : " vite preview" ,
29- "docs" : " typedoc"
28+ "preview" : " vite preview"
3029 },
3130 "devDependencies" : {
3231 "@types/node" : " ^20.14.10" ,
3332 "jsdom" : " ^24.1.0" ,
3433 "prettier" : " 3.3.2" ,
35- "typedoc" : " ^0.27.6" ,
3634 "typescript" : " ^5.2.2" ,
3735 "vite" : " ^5.3.1" ,
3836 "vitest" : " ^2.0.0"
3937 },
4038 "dependencies" : {
41- "@microbit/microbit-fs" : " ^0.9.2" ,
4239 "@microbit/microbit-universal-hex" : " ^0.2.2" ,
4340 "@types/web-bluetooth" : " ^0.0.20" ,
4441 "crelt" : " ^1.0.6" ,
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ import { MicrobitWebUSBConnection } from "../lib/usb";
2020import { MicrobitRadioBridgeConnection } from "../lib/usb-radio-bridge" ;
2121import "./demo.css" ;
2222import { MagnetometerDataEvent } from "../lib/magnetometer" ;
23- import { MicropythonFsHex } from "@microbit/microbit-fs" ;
24- import { BoardId } from "../lib/board-id" ;
2523
2624type ConnectionType = "usb" | "bluetooth" | "radio" ;
2725
@@ -211,15 +209,9 @@ const createFlashSection = (): Section => {
211209 const file = ( e . currentTarget as HTMLInputElement ) . files ?. item ( 0 ) ;
212210 if ( file ) {
213211 const text = await file . text ( ) ;
214- const boardId = BoardId . forVersion ( "V1" ) . id ;
215- console . log ( boardId ) ;
216- const micropythonFs = new MicropythonFsHex ( [
217- { hex : text , boardId } ,
218- ] ) ;
219212 if ( connection . flash ) {
220213 console . time ( "flash" ) ;
221- const hex = micropythonFs . getIntelHex ( boardId ) ;
222- await connection . flash ( async ( ) => hex , {
214+ await connection . flash ( createUniversalHexFlashDataSource ( text ) , {
223215 partial : true ,
224216 progress : ( percentage : number | undefined ) => {
225217 console . log ( percentage ) ;
You can’t perform that action at this time.
0 commit comments