Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Preview of forthcoming beta MicroPython #1156

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5b3993c
Update to audio-recording branch of MicroPython
microbit-matt-hillsdon Mar 19, 2024
bce9112
Typeshed en with get_touches
microbit-grace Mar 20, 2024
077245d
Sync with beta stubs
microbit-matt-hillsdon Mar 20, 2024
b28c6d0
Update typeshed en
microbit-grace Mar 20, 2024
c328fb3
Update to version from https://github.com/microbit-foundation/micropy…
microbit-matt-hillsdon Mar 27, 2024
fb159d2
Update beta hex
microbit-grace Apr 3, 2024
f2482df
Update typeshed with ticks_cpu stub
microbit-grace Apr 3, 2024
08a18aa
Use branch sim for now
microbit-grace Apr 3, 2024
ddaebfd
Comment out import temporarily for tsc
microbit-grace Apr 3, 2024
839e1cb
Update typeshed to add audio.sound_level doc
microbit-grace Apr 3, 2024
9d13ed2
Add audio frame operations
microbit-matt-hillsdon Apr 3, 2024
99bf51c
Update with record fix
microbit-matt-hillsdon Apr 3, 2024
24843c7
Update typeshed doc
microbit-grace Apr 15, 2024
1e0b7f6
Update beta micropython and hex
microbit-grace May 3, 2024
e6b8f32
Update typeshed for microphone_level_db doc
microbit-grace May 3, 2024
8e948da
Upgrade to latest prerelease
microbit-matt-hillsdon May 23, 2024
54a3f8b
Merge branch 'main' into beta-micropython
microbit-matt-hillsdon May 23, 2024
8c050dc
Merge branch 'main' into beta-micropython
microbit-matt-hillsdon Aug 20, 2024
f74e450
WIP stubs and updated to audio-recording latest
microbit-matt-hillsdon Aug 20, 2024
a1a086f
Corrections
microbit-matt-hillsdon Aug 21, 2024
1caadde
Corrections
microbit-matt-hillsdon Aug 21, 2024
c76c0c1
Update to https://github.com/microbit-foundation/micropython-microbit…
microbit-matt-hillsdon Aug 21, 2024
8f7657e
Lint
microbit-matt-hillsdon Aug 21, 2024
b5f48e2
Update microphone stubs
microbit-matt-hillsdon Aug 21, 2024
6e97732
Update for audio.play
microbit-matt-hillsdon Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28,343 changes: 28,343 additions & 0 deletions src/micropython/beta/microbit-micropython-v2.hex

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.ca.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.de.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.en.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.es-es.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.fr.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.ja.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.ko.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.nl.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.zh-cn.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions src/micropython/beta/typeshed.zh-tw.json

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions src/micropython/micropython.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { IntelHexWithId } from "@microbit/microbit-fs";
import { microbitBoardId } from "@microbit/microbit-universal-hex";
import microPythonV1HexUrl from "./microbit-micropython-v1.hex";
import microPythonV2HexUrl from "./main/microbit-micropython-v2.hex";
import microPythonV2BetaHexUrl from "./beta/microbit-micropython-v2.hex";
import { stage } from "../environment";

const v2Main = {
name: "MicroPython (micro:bit V2)",
Expand All @@ -16,6 +18,18 @@ const v2Main = {
web: "https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.2",
};

// This isn't the beta yet - we're using a branch build temporarily.
const v2Beta = {
name: "MicroPython (micro:bit V2)",
url: microPythonV2BetaHexUrl,
boardId: microbitBoardId.V2,
version: "0b06914c71c18533da90df85230ac198578669bf",
// It's not the beta yet!
web: "https://github.com/microbit-foundation/micropython-microbit-v2/pull/163",
};

const isBetaMicroPython = stage !== "PRODUCTION";

export const microPythonConfig = {
versions: [
{
Expand All @@ -25,11 +39,11 @@ export const microPythonConfig = {
version: "1.1.1",
web: "https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.1",
},
v2Main,
isBetaMicroPython ? v2Beta : v2Main,
],
// We've previously used this field to allow flags to affect
// the stubs used and might do so again.
stubs: "main",
stubs: isBetaMicroPython ? "beta" : "main",
};

const fetchValidText = async (input: RequestInfo) => {
Expand Down
16 changes: 8 additions & 8 deletions src/simulator/Simulator.tsx
Copy link
Contributor

@microbit-grace microbit-grace Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes to undo once sim changes are in staging

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import HideSplitViewButton from "../common/SplitView/HideSplitViewButton";
import { topBarHeight } from "../deployment/misc";
import { DeviceContextProvider } from "../device/device-hooks";
import { SimulatorDeviceConnection } from "../device/simulator";
import { stage } from "../environment";
// import { stage } from "../environment";
import { useLogging } from "../logging/logging-hooks";
import SimulatorActionBar from "./SimulatorActionBar";
import SimulatorSplitView from "./SimulatorSplitView";
Expand All @@ -43,14 +43,14 @@ const Simulator = ({
minWidth,
simFocus,
}: SimulatorProps) => {
const production =
"https://python-simulator.usermbit.org/v/0.1/simulator.html";
const staging =
"https://python-simulator.usermbit.org/staging/simulator.html";
const url = stage === "PRODUCTION" ? production : staging;
// const production =
// "https://python-simulator.usermbit.org/v/0.1/simulator.html";
// const staging =
// "https://python-simulator.usermbit.org/staging/simulator.html";
// const url = stage === "PRODUCTION" ? production : staging;
// For testing with sim branches:
//const branch = "upgrade-mpy";
//const url = `https://review-python-simulator.usermbit.org/${branch}/simulator.html`;
const branch = "beta-updates";
const url = `https://review-python-simulator.usermbit.org/${branch}/simulator.html`;

const ref = useRef<HTMLIFrameElement>(null);
const intl = useIntl();
Expand Down
Loading