Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 19 additions & 8 deletions src/firmware/bootloaderInstructions/BootloaderInstructions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2022-2025 The Pybricks Authors
// Copyright (c) 2022-2026 The Pybricks Authors

import './bootloaderInstructions.scss';
import { Callout, Intent } from '@blueprintjs/core';
Expand All @@ -19,6 +19,8 @@ import cityHubMp4 from './assets/bootloader-cityhub-540.mp4';
import cityHubVtt from './assets/bootloader-cityhub-metadata.vtt';
import essentialHubMp4 from './assets/bootloader-essentialhub-540.mp4';
import essentialHubVtt from './assets/bootloader-essentialhub-metadata.vtt';
import ev3BrickMp4 from './assets/bootloader-ev3brick-540.mp4';
import ev3BrickVtt from './assets/bootloader-ev3brick-metadata.vtt';
import inventorHubMp4 from './assets/bootloader-inventorhub-540.mp4';
import inventorHubVtt from './assets/bootloader-inventorhub-metadata.vtt';
import moveHubMp4 from './assets/bootloader-movehub-540.mp4';
Expand Down Expand Up @@ -54,6 +56,7 @@ type BootloaderInstructionsProps = {
const bootloaderDeviceNameMap: ReadonlyMap<Hub, string> = new Map([
[Hub.City, 'LEGO Bootloader'],
[Hub.Essential, 'LEGO Technic Small Hub in DFU Mode'],
[Hub.EV3, 'LEGO EV3 Firmware Update'],
[Hub.Inventor, 'LEGO Technic Large Hub in DFU Mode'],
[Hub.Move, 'LEGO Bootloader'],
[Hub.Prime, 'LEGO Technic Large Hub in DFU Mode'],
Expand All @@ -63,6 +66,7 @@ const bootloaderDeviceNameMap: ReadonlyMap<Hub, string> = new Map([
const videoFileMap: ReadonlyMap<Hub, string> = new Map([
[Hub.City, cityHubMp4],
[Hub.Essential, essentialHubMp4],
[Hub.EV3, ev3BrickMp4],
[Hub.Inventor, inventorHubMp4],
[Hub.Move, moveHubMp4],
[Hub.Prime, primeHubMp4],
Expand All @@ -72,6 +76,7 @@ const videoFileMap: ReadonlyMap<Hub, string> = new Map([
const metadataFileMap: ReadonlyMap<Hub, string> = new Map([
[Hub.City, cityHubVtt],
[Hub.Essential, essentialHubVtt],
[Hub.EV3, ev3BrickVtt],
[Hub.Inventor, inventorHubVtt],
[Hub.Move, moveHubVtt],
[Hub.Prime, primeHubVtt],
Expand All @@ -81,6 +86,7 @@ const metadataFileMap: ReadonlyMap<Hub, string> = new Map([
const recoveryVideoFileMap: ReadonlyMap<Hub, string> = new Map([
[Hub.City, cityHubRecoveryMp4],
[Hub.Essential, essentialHubMp4],
[Hub.EV3, ev3BrickMp4],
[Hub.Inventor, inventorHubMp4],
[Hub.Move, moveHubRecoveryMp4],
[Hub.Prime, primeHubMp4],
Expand All @@ -90,6 +96,7 @@ const recoveryVideoFileMap: ReadonlyMap<Hub, string> = new Map([
const recoveryMetadataFileMap: ReadonlyMap<Hub, string> = new Map([
[Hub.City, cityHubRecoveryVtt],
[Hub.Essential, essentialHubVtt],
[Hub.EV3, ev3BrickVtt],
[Hub.Inventor, inventorHubVtt],
[Hub.Move, moveHubRecoveryVtt],
[Hub.Prime, primeHubVtt],
Expand Down Expand Up @@ -186,12 +193,6 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
})}
</li>
)}

{hubType === Hub.EV3 && (
<li>
{i18n.translate('instructionGroup.bootloaderMode.connectUsb')}
</li>
)}
</>
),
[i18n, recovery, hubType],
Expand Down Expand Up @@ -314,6 +315,16 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
})}
</li>
)}

{hubType === Hub.EV3 && hubHasUSB(hubType) && (
<li
className={classNames(
activeStep === 'connect-usb' && 'pb-active-step',
)}
>
{i18n.translate('instructionGroup.bootloaderMode.connectUsb')}
</li>
)}
</>
),
[recovery, activeStep, i18n, button, hubType, light, lightPattern],
Expand Down Expand Up @@ -377,7 +388,7 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
1
}
>
{hubType === Hub.EV3 && (
{hubType === Hub.EV3 && recovery && (
<li>
{i18n.translate(
'instructionGroup.connect.selectEV3FirmwareType',
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
WEBVTT

hold-button
00:00.100 --> 00:02.200

press-power-button
00:02.200 --> 00:05.210

release-button
00:05.210 --> 00:08.010

connect-usb
00:08.010 --> 00:11.200