Skip to content

Conversation

@takaokouji
Copy link

Microbit拡張機能と同様に、MicrobitMore拡張機能でもファームウェア(.hexファイル)を自動的にダウンロードし、接続トラブル時に「周辺機器を更新 (Update Peripheral)」できるようにする機能を実装しました。

変更内容

  • scripts/prepublish.mjs: ビルド時に MicrobitMore の Hex をダウンロードし、URLファイルを生成する処理を追加。
  • src/lib/microbit-more-update.js: MicrobitMore 専用の更新ロジックを実装。V2専用のHexであることを考慮し、V1デバイス検出時はエラーを表示するようにしました。
  • src/containers/connection-modal.jsx: microbitMore 拡張機能においてファームウェア更新UIを有効化し、適切な更新関数を呼び出すように修正。
  • .gitignore: ダウンロードされた MicrobitMore の Hex を除外対象に追加。

動作確認

  • node scripts/prepublish.mjs を実行し、正しくHexがダウンロードされ、src/generated/ 以下にファイルが生成されることを確認しました。
  • eslint によるチェックをパスしました。

- Update prepublish.mjs to download MicrobitMore hex (V2) during build
- Create microbit-more-update.js for firmware writing (V2 only)
- Update connection-modal.jsx to support firmware update for microbitMore
- Update .gitignore to exclude downloaded hex files

Co-Authored-By: Gemini <noreply@google.com>
takaokouji and others added 8 commits January 17, 2026 21:33
- Update ErrorStep and UnavailableStep to show update button if onUpdatePeripheral is provided
- Pass onUpdatePeripheral and onScanning props to these steps in ConnectionModalComponent
- Ensures MicrobitMore users can reach update screen even if scanning doesn't timeout

Co-Authored-By: Gemini <noreply@google.com>
…anslations

- Implement universal hex support in microbit-more-update.js to correctly flash V2 devices
- Fix a bug in microbit-update.js where the entire universal hex was being flashed
- Add missing Japanese translations for firmware update instructions
- Remove debug logs from microbit-more-update.js
- Add transport open error handling with logging

Co-Authored-By: Gemini <noreply@google.com>
- Update UpdatePeripheralStep to show specific success message for MicrobitMore
- Add instruction to tilt micro:bit to complete the update process
- Update ja.js and ja-Hira.js with specific success messages and instructions
- Fix typos in Japanese translations

Co-Authored-By: Gemini <noreply@google.com>
- Add .important-instruction style to connection-modal.css
- Apply importantInstruction style to MicrobitMore tilt instruction in UpdatePeripheralStep

Co-Authored-By: Gemini <noreply@google.com>
- Change 'デバイスをアップデート' to 'アップデート' in ja.js and ja-Hira.js
- Clean up indentation and formatting in locale files
- Fix lint errors (missing final newline)

Co-Authored-By: Gemini <noreply@google.com>
- Add $ui-red to colors.css (hsla(0, 100%, 50%, 1))
- Use $ui-red for .important-instruction in connection-modal.css

Co-Authored-By: Gemini <noreply@google.com>
- Wrap FormattedMessage in Box components to apply className
- Ensure MicrobitMore instructions and success/fail messages are styled correctly

Co-Authored-By: Gemini <noreply@google.com>
@takaokouji takaokouji merged commit 861d894 into develop Jan 17, 2026
3 checks passed
@takaokouji takaokouji deleted the feature/microbit-more-firmware-update branch January 17, 2026 14:29
github-actions bot pushed a commit that referenced this pull request Jan 17, 2026
…bit-more-firmware-update

feat: MicrobitMore拡張機能のファームウェア更新機能の実装
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants