Skip to content

Commit 904f48c

Browse files
Revert unintended code changes
1 parent 52615cd commit 904f48c

File tree

3 files changed

+2
-221
lines changed

3 files changed

+2
-221
lines changed

package-lock.json

Lines changed: 0 additions & 208 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,17 @@
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",

src/demo.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { MicrobitWebUSBConnection } from "../lib/usb";
2020
import { MicrobitRadioBridgeConnection } from "../lib/usb-radio-bridge";
2121
import "./demo.css";
2222
import { MagnetometerDataEvent } from "../lib/magnetometer";
23-
import { MicropythonFsHex } from "@microbit/microbit-fs";
24-
import { BoardId } from "../lib/board-id";
2523

2624
type 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);

0 commit comments

Comments
 (0)