Commit Graph
3062 Commits
Author SHA1 Message Date
David Lechner a4aade5a29 firmware/actions: remove didStart and didFinish actions
Remove didStart and didFinish actions from firmware flashing sagas as
they are not used for anything.

didFailToFinish is not so easily removed as it is used to trigger error
toasts.
2026-01-04 17:27:08 -06:00
David Lechner 7fe080bf1a firmware/reducers: remove 'flashing' state
The 'flashing' state variable in the firmware reducer is not used
anymore so can be removed.
2026-01-04 17:27:08 -06:00
David Lechner 6911bdd3da firmware/sagas: fix duplicate error alerts for ev3 flashing
Remove alertsShowAlert() calls. didFailToFinish() already triggers
an error toast.
2026-01-04 17:27:08 -06:00
David Lechner 71a6727a8f firmware/actions: reuse isError from utils
Remove duplicate isError function.
2026-01-04 17:27:08 -06:00
James Aguilar d19ded5908 firmware/ev3: Don't request hardware version.
This feature doesn't seem to work when it is issued from a USB3 bus.
See https://github.com/pybricks/support/issues/2515. Since we don't
use the version, removing the command is harmless.
2026-01-04 03:06:42 +00:00
David Lechner 0d0e366cba firmware/sagas: fix progress toasts not being removed on error
Add some calls to hide the progress toasts when an error occurs during
firmware flashing. Without this, the toasts would remain visible even
after the error alert was shown.
2026-01-03 21:01:53 -06:00
David Lechner 830855e428 firmware: remove progress/didProgress
Remove the didProgress action and progress state, as they were not being used.
2026-01-03 21:01:53 -06:00
David Lechner 4469e173cd firmware/sagas: add check for new SPIKE Prime bootloader version 2026-01-03 21:01:53 -06:00
James Aguilar 8db1a27486 firmware: Don't add checksums when not needed.
This fixes an issue where the EV3 firmware had checksums appended to
it that made its size not align to the sector size, causing flashing
to fail.
2026-01-02 17:34:46 -06:00
David Lechner 4516cc8764 yarn: Bump @types/w3c-web-usb from 1.0.10 to 1.0.11
Patch got merged upstream, so we no longer need it.
2025-09-06 12:51:33 -04:00
David Lechner fa21abc7ec firmware/sagas: fix missing error arg when unknown reason
For some reason, the type checker doesn't catch this, but
FailToFinishReasonType.Unknown requires an error argument, otherwise
we get an unhandled exception.
2025-08-30 19:12:53 -04:00
Attila Farago 00516f2a39 firmware/installPybricksDialog: finish EV3 implementation
Add missing bits to get firmware flashing on EV3 working. Currently
requires custom firmware since we don't have a packaged one yet.
2025-08-30 19:12:53 -04:00
David Lechner 84cca9d8e6 firmware/sagas: finish EV3 message ID TODO
Implement unique message ID for EV3 firmware messages.
2025-08-30 19:12:53 -04:00
Attila Farago 7ef6c02198 firmware/sagas: fix race condition in EV3 sendCommand()
Start listening for reply before sending command to avoid race condition
of reply being received and action dispatched before we call take().
2025-08-30 19:12:53 -04:00
David Lechner 426305116b firmware/sagas: handle case of checksum-type == 'none'
The v2.1 spec allows this, but up to now, Pybricks code didn't handle it.
2025-08-30 19:12:53 -04:00
Attila Farago fadc3bc8c7 firmware/installPybricksDialog/hooks: dispatch error if no url
Dispatch an error in case there is no firmware URL. Normally this should
never happen, but currently it does because we don't have EV3 firmware
yet. The error is more useful than just spinning forever.
2025-08-30 19:12:53 -04:00
Attila Farago c6302232e3 usb/sagas: always set configuration
On some OSes, like macOS, the configuration may not be selected, so we
need to make sure it is always set.
2025-08-30 19:12:53 -04:00
David Lechner 6fc327a917 yarn: patch @types/w3c-web-usb
Fix issues with null vs. undefined.

Based on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/73568
2025-08-30 19:12:53 -04:00
David Lechner 1f81fbb8c7 webpack: bump precache size to 16MiB for EV3 firmware 2025-08-09 21:51:47 -05:00
David Lechner c0b2c13e7c github: update codevcov action version 2025-08-09 21:51:47 -05:00
David Lechner 8365f71ca3 npx update-browserslist-db@latest 2025-08-09 21:51:47 -05:00
David Lechner 70bedecb83 firmware: implement EV3 official firmware restore
Basic support for restoring the official EV3 firmware. Is missing a video
and needs a bunch of helpful error messages, but basic functionality
is working.
2025-08-09 21:51:47 -05:00
David Lechner 007640c7b6 firmware: add UI for EV3 firmware flashing
This is just the UI bits (new file template, Pybricks firmware install,
official firmware restore).

The Pybricks firmware flashing hangs because we don't have a EV3 firmware
yet in @pybricks/firmware. Official firmware restore has an alert()
placeholder so at least it does something.
2025-08-09 21:51:47 -05:00
David Lechner 8b5cab4760 s/Web USB/WebUSB/g 2025-08-09 21:51:47 -05:00
David Lechner 5e8c8b8743 firmware: installPybricksDialog: add exception for Technic Move hub
The Technic Move hub requires signed firmware, so we cannot install
Pybricks on it.
2025-08-09 21:51:47 -05:00
David Lechner a546109273 usb: add USB support
Initial working USB support.
2025-08-08 21:36:18 -05:00
David Lechner 38db0d016c hub: move hub info reducers to hub
Most of the hub state doesn't depend on the connection type. To make it
generic, move it out of ble and into hub so that we can share it with
usb.
2025-08-08 21:36:18 -05:00
David Lechner 1fe01b5719 status-bar: make visibility depend on runtime state
Change dependency on Bluetooth connection state to runtime state. This
way it works for USB connection as well.
2025-08-08 21:36:18 -05:00
David Lechner 3c4cc20c53 ble-pybricks-service: add support for slots
The firmware has added some additional info for hubs that support slots
for user programs. Add these additional parameters accordingly.
2025-07-26 16:14:40 -05:00
David Lechner 1a7663a383 ble-pybricks-service: rename slot to progId
Rename the requested program ID from slot to progId and the running
program ID to runningProgId. These can also have the value of built-in
programs, not just slot numbers, so it doesn't make sense to call them
slots.
2025-07-26 16:14:40 -05:00
Laurens Valk 0aeb53d1f6 deps: Bump firmware and docs. 2025-02-26 13:08:59 +01:00
dependabot[bot] 4c364e7fd5 build(deps): bump nanoid from 3.3.7 to 3.3.8 (#2330)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-14 09:42:58 +00:00
dependabot[bot] 27fc1b0a2d build(deps): bump cross-spawn from 7.0.3 to 7.0.6 (#2325)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 22:33:28 +00:00
David Lechner 0472978e50 ble-pybricks-service/sagas: simplify test
I meant to change this before merging the previous commit, but missed it.

The mismatch test was hard to understand and didn't increase coverage,
so let's leave it out.
2024-10-27 18:12:24 -05:00
Attila FaragoandDavid Lechner 14f4716dbc Implemented pybricks protocol v1.4.0 (#2317)
* Update for changed StartUserProgram command semantics
* Added new capability flags and fixed-purpose slot definitions
* Update for new start REPL command
* Updated StartUserProgram command and Status event for slots
* Added new AppData command and event

---------

Co-authored-by: David Lechner <david@pybricks.com>
2024-10-27 17:59:04 -05:00
dependabot[bot] 41a397a8a3 build(deps): bump http-proxy-middleware from 2.0.6 to 2.0.7 (#2320)
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-25 07:51:12 +00:00
dependabot[bot] 482a554779 build(deps): bump rollup from 2.72.1 to 2.79.2 (#2314)
Bumps [rollup](https://github.com/rollup/rollup) from 2.72.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.72.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-27 11:47:42 +00:00
dependabot[bot] bddb059700 build(deps): bump express from 4.19.2 to 4.21.0 (#2312)
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-21 06:22:57 +00:00
David Lechner baaa9a7920 terminal/sagas: fix handling multibyte unicode
Enable the stream option on the text decode for the stdout and uart
stream handlers that pipe data to the terminal. This fixes improperly
printing multibyte unicode characters that get split across multiple
data packets.

A new decode is added for each different stream in case both are used
at the same time.

Fixes: https://github.com/pybricks/support/issues/1743
2024-09-08 17:52:12 -05:00
David Lechner a308303f07 firmware/sagas: revert debug changes
This was missed in the last commit.
2024-09-08 17:19:39 -05:00
David Lechner 236ad56148 firmware/sagas: reduce BLE firmware burst size
Mac users have recently been reporting failed firmware updates due to
the hub disconnecting during the update process. This is likely due to
the Mac sending packets faster than the hub can handle. This changes
the arbitrary BLE firmware burst size from 10 to 8 to reduce the chance
of the hub getting overwhelmed.

Fixes: https://github.com/pybricks/support/issues/1787
2024-09-08 17:10:14 -05:00
dependabot[bot] 6605c72bdf build(deps): bump @shopify/react-i18n from 7.8.0 to 7.13.1 (#2303)
Bumps [@shopify/react-i18n](https://github.com/Shopify/quilt/tree/HEAD/packages/react-i18n) from 7.8.0 to 7.13.1.
- [Release notes](https://github.com/Shopify/quilt/releases)
- [Changelog](https://github.com/Shopify/quilt/blob/main/packages/react-i18n/CHANGELOG.md)
- [Commits](https://github.com/Shopify/quilt/commits/@shopify/react-i18n@7.13.1/packages/react-i18n)

---
updated-dependencies:
- dependency-name: "@shopify/react-i18n"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-08 21:37:22 +00:00
David Lechner d0abe4ea8a config/licenses: add @shopify/name 2024-09-08 16:31:34 -05:00
David Lechner b24c247fe9 npx update-browserslist-db@latest 2024-09-08 15:58:58 -05:00
dependabot[bot] ab3114bd6b build(deps): bump micromatch from 4.0.5 to 4.0.8 (#2305)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-31 14:47:29 +00:00
dependabot[bot] bf44cf5dc5 build(deps): bump ws from 8.13.0 to 8.17.1 (#2293)
Bumps [ws](https://github.com/websockets/ws) from 8.13.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.13.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 06:35:27 +00:00
dependabot[bot] f7549201f1 build(deps): bump braces from 3.0.2 to 3.0.3 (#2292)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 09:51:28 +00:00
dependabot[bot] 19a809b6df build(deps): bump ejs from 3.1.8 to 3.1.10 (#2287)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.8 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.8...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 01:36:18 +00:00
dependabot[bot] 2721ca3541 build(deps): bump tar from 6.1.11 to 6.2.1 (#2284)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.11 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.11...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 22:17:18 +00:00
dependabot[bot] 4058644387 build(deps): bump express from 4.18.1 to 4.19.2 (#2281)
Bumps [express](https://github.com/expressjs/express) from 4.18.1 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.1...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 05:03:49 +00:00