feat(firmware): migrate AT/SysEx/USB-MIDI to hexaTuneProto shared library#39
Merged
Merged
Conversation
…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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace hand-written AT command parser, SysEx framing, and USB MIDI packetization with
hexa-tune-protoandhexa-tune-proto-embeddedcrates to establish a unified protocol layer shared between embedded firmware and Flutter mobile app.Changes
hexa-tune-protoandhexa-tune-proto-embeddedpath dependenciessha2andbase64dependenciesErrorenum withFirmwareErrorwrapper (Proto/Hexa/firmware)AtCommand-basedMsgenum with typed variants (RgbSet,FreqSet, etc.)sysex/mod.rs— replaced byhexa_tune_proto::sysexat/command.rs— replaced byhexa_tune_proto::at::parse/encodeat/handler.rs— replaced byHexaCommandmatch dispatchhandlers/reset_handler.rs— reset is now inline inat_taskdispatcher.rswith library-based dispatch and encoding helpersat_task.rswithHexaCommanddispatch, no more static dispatcherusb_task.rswith library depacketize/unframe (RX) and frame/packetize (TX)dds_task.rswith typed messages andFreqStepinstead ofAtCommandrgb_task.rs— no more parameter parsing fromAtCommandad985x.rserror type fromErrortoFirmwareErrormain.rs— removemod sysex, removeAtDispatcherstatic cellStats
23 files changed, +423 −810 lines (net −387)