mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
Add support for MPY ABI v6.
Pybricks firmware v3.2.0b2 has updated to MicroPython 1.19 which includes breaking changes to the MPY binary file format.
This commit is contained in:
@@ -20,5 +20,5 @@ it('should dispatch action when clicked', async () => {
|
||||
|
||||
await user.click(button.getByRole('button', { name: 'Run' }));
|
||||
|
||||
expect(dispatch).toHaveBeenCalledWith(downloadAndRun());
|
||||
expect(dispatch).toHaveBeenCalledWith(downloadAndRun(6));
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@ type RunButtonProps = Pick<ActionButtonProps, 'id'>;
|
||||
|
||||
const RunButton: React.VoidFunctionComponent<RunButtonProps> = ({ id }) => {
|
||||
const downloadProgress = useSelector((s) => s.hub.downloadProgress);
|
||||
const mpyAbiVersion = useSelector((s) => s.hub.mpyAbiVersion);
|
||||
const runtime = useSelector((s) => s.hub.runtime);
|
||||
const isEditorReady = useSelector((s) => s.editor.isReady);
|
||||
const keyboardShortcut = 'F5';
|
||||
@@ -37,7 +38,7 @@ const RunButton: React.VoidFunctionComponent<RunButtonProps> = ({ id }) => {
|
||||
enabled={isEditorReady && runtime === HubRuntimeState.Idle}
|
||||
showProgress={runtime === HubRuntimeState.Loading}
|
||||
progress={downloadProgress === null ? undefined : downloadProgress}
|
||||
onAction={() => dispatch(downloadAndRun())}
|
||||
onAction={() => dispatch(downloadAndRun(mpyAbiVersion))}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user