Skip to content

feat(firmware): migrate AT/SysEx/USB-MIDI to hexaTuneProto shared library#39

Merged
husamettinarabaci merged 1 commit into
developfrom
feat/proto-migration
Mar 4, 2026
Merged

feat(firmware): migrate AT/SysEx/USB-MIDI to hexaTuneProto shared library#39
husamettinarabaci merged 1 commit into
developfrom
feat/proto-migration

Conversation

@husamettinarabaci

Copy link
Copy Markdown
Member

Summary

Replace hand-written AT command parser, SysEx framing, and USB MIDI packetization with hexa-tune-proto and hexa-tune-proto-embedded crates to establish a unified protocol layer shared between embedded firmware and Flutter mobile app.

Changes

  • Add hexa-tune-proto and hexa-tune-proto-embedded path dependencies
  • Remove unused sha2 and base64 dependencies
  • Replace Error enum with FirmwareError wrapper (Proto/Hexa/firmware)
  • Replace AtCommand-based Msg enum with typed variants (RgbSet, FreqSet, etc.)
  • Delete sysex/mod.rs — replaced by hexa_tune_proto::sysex
  • Delete at/command.rs — replaced by hexa_tune_proto::at::parse/encode
  • Delete at/handler.rs — replaced by HexaCommand match dispatch
  • Delete handlers/reset_handler.rs — reset is now inline in at_task
  • Rewrite dispatcher.rs with library-based dispatch and encoding helpers
  • Rewrite at_task.rs with HexaCommand dispatch, no more static dispatcher
  • Rewrite usb_task.rs with library depacketize/unframe (RX) and frame/packetize (TX)
  • Rewrite dds_task.rs with typed messages and FreqStep instead of AtCommand
  • Simplify all handlers to accept typed parameters instead of string parsing
  • Simplify rgb_task.rs — no more parameter parsing from AtCommand
  • Update ad985x.rs error type from Error to FirmwareError
  • Update main.rs — remove mod sysex, remove AtDispatcher static cell

Stats

23 files changed, +423 −810 lines (net −387)

…rary

Replace hand-written AT command parser, SysEx framing, and USB MIDI
packetization with hexa-tune-proto and hexa-tune-proto-embedded crates
to establish a unified protocol layer shared between embedded firmware
and Flutter mobile app.

Changes:
- Add hexa-tune-proto and hexa-tune-proto-embedded path dependencies
- Remove unused sha2 and base64 dependencies
- Replace Error enum with FirmwareError wrapper (Proto/Hexa/firmware)
- Replace AtCommand-based Msg enum with typed variants (RgbSet, FreqSet, etc.)
- Delete sysex/mod.rs — replaced by hexa_tune_proto::sysex
- Delete at/command.rs — replaced by hexa_tune_proto::at::parse/encode
- Delete at/handler.rs — replaced by HexaCommand match dispatch
- Delete handlers/reset_handler.rs — reset is now inline in at_task
- Rewrite dispatcher.rs with library-based dispatch and encoding helpers
- Rewrite at_task.rs with HexaCommand dispatch, no more static dispatcher
- Rewrite usb_task.rs with library depacketize/unframe (RX) and frame/packetize (TX)
- Rewrite dds_task.rs with typed messages and FreqStep instead of AtCommand
- Simplify all handlers to accept typed parameters instead of string parsing
- Simplify rgb_task.rs — no more parameter parsing from AtCommand
- Update ad985x.rs error type from Error to FirmwareError
- Update main.rs — remove mod sysex, remove AtDispatcher static cell

Stats: 23 files changed, +423 -810 lines (net -387)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added module:firmware Firmware type:infra Infrastructure, CI/CD, build system labels Mar 4, 2026
@github-project-automation github-project-automation Bot moved this to 📥 Inbox / Ideas in hexaTune Project Mar 4, 2026
@husamettinarabaci husamettinarabaci merged commit d166f21 into develop Mar 4, 2026
6 of 10 checks passed
@husamettinarabaci husamettinarabaci deleted the feat/proto-migration branch March 4, 2026 06:43
@github-project-automation github-project-automation Bot moved this from 📥 Inbox / Ideas to Done in hexaTune Project Mar 4, 2026
@husamettinarabaci husamettinarabaci mentioned this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:firmware Firmware type:infra Infrastructure, CI/CD, build system

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant