Skip to content

feat(core): at command is made by id based - #29

Merged
husamettinarabaci merged 1 commit into
developfrom
feat/id-based-at-command
Oct 21, 2025
Merged

husamettinarabaci merged 1 commit into
developfrom
feat/id-based-at-command

Conversation

@husamettinarabaci

Copy link
Copy Markdown
Member

Changed all message types to at command base and id forced for all at command


🧩 Affected Module(s)

Mark the modules impacted by this PR:

  • Firmware
  • Hardware
  • Mechanic
  • Documentation
  • CI / Infra

This pull request refactors the AT command handling system to use structured AtCommand objects throughout the firmware, improving message consistency and extensibility. The main changes include updating how commands and responses are parsed, compiled, and dispatched, and modifying message types to carry richer information. Handler traits and implementations are also updated to work with the new command structure.

AT Command Message Refactor:

  • Changed the Msg enum in message_type.rs to use structured variants (AtRxLine, AtCmdOutput, Done, Err, ErrWOCommand, RgbWithValue, FreqWithValue, etc.), replacing the previous MsgDirection and raw string-based messaging. This enables passing full AtCommand objects and IDs, improving clarity and extensibility.

  • Updated the AT command parsing logic in command.rs to extract and store a command ID as part of the AtCommand struct, and refactored the compile method to include the ID in the output. Helper functions (get_empty_id, compile_at_done, compile_at_error) were added/modified to support the new message format. [1] [2] [3] [4] [5] [6] [7]

Handler and Dispatcher Updates:

  • Refactored the AtHandler trait and all handler implementations (freq_handler.rs, setrgb_handler.rs, version_handler.rs, fwupdate_handler.rs, reset_handler.rs) to accept a full AtCommand object instead of separate parameters and query flags, simplifying handler logic and enabling richer command handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

  • Updated the AtDispatcher to pass the full AtCommand to handlers, aligning with the new trait signature and message format.

Task and Message Flow Changes:

  • Refactored the main AT task loop in at_task.rs to handle the new message variants, including proper compilation and routing of responses using IDs and structured commands. Added support for new message types such as SetDdsAvailable. [1] [2]

DDS and RGB Command Handling:

  • Updated DDS and RGB command tasks to use full AtCommand objects in their message passing, enabling more flexible and consistent handling of command data. [1] [2] [3]

These changes collectively make the AT command handling system more robust and easier to maintain by using structured data instead of raw strings, improving error handling, and simplifying handler interfaces.

Changed all message types to at command base and id forced for all at command
@github-project-automation github-project-automation Bot moved this to 📥 Inbox / Ideas in hexaTune Project Oct 21, 2025
@github-actions github-actions Bot added the module:firmware Firmware label Oct 21, 2025
@husamettinarabaci
husamettinarabaci merged commit 4128984 into develop Oct 21, 2025
9 checks passed
@husamettinarabaci
husamettinarabaci deleted the feat/id-based-at-command branch October 21, 2025 20:10
@github-project-automation github-project-automation Bot moved this from 📥 Inbox / Ideas to Done in hexaTune Project Oct 21, 2025
husamettinarabaci added a commit that referenced this pull request Oct 22, 2025
* feat(setup): added basic at command (#19)

Added basic at command implementation. It support usb-midi sysex protocol

* feat(setup): setted up pre commit hooks (#20)

Added reuse prettier commitlint hook

* feat(setup): setted up pre commit hooks (#21)

Added reuse prettier commitlint hook 3

* feat(async): setted up async tasks (#23)

Added rgb usb at async tasks and channel before firmware update

* feat(firmware): added basic firmware update (#24)

Added simple bootsel FWUPDATE command to At

* feat(com): passed first communication (#25)

Communicated with mobile app first time

* feat(freq): added basic freq handler (#27)

Added simple at freq handler not check and control

* feat(core): added multi core (#28)

System is configured for working multi-core. DDS task is working on the Core-1 and others on the Core-0

* feat(core): at command is made by id based (#29)

Changed all message types to at command base and id forced for all at command

* docs(basic): added basic docs Added simple documantation for version v1.0.0 (#30)
husamettinarabaci added a commit that referenced this pull request Oct 30, 2025
* feat(setup): added basic at command (#19)

Added basic at command implementation. It support usb-midi sysex protocol

* feat(setup): setted up pre commit hooks (#20)

Added reuse prettier commitlint hook

* feat(setup): setted up pre commit hooks (#21)

Added reuse prettier commitlint hook 3

* feat(async): setted up async tasks (#23)

Added rgb usb at async tasks and channel before firmware update

* feat(firmware): added basic firmware update (#24)

Added simple bootsel FWUPDATE command to At

* feat(com): passed first communication (#25)

Communicated with mobile app first time

* feat(freq): added basic freq handler (#27)

Added simple at freq handler not check and control

* feat(core): added multi core (#28)

System is configured for working multi-core. DDS task is working on the Core-1 and others on the Core-0

* feat(core): at command is made by id based (#29)

Changed all message types to at command base and id forced for all at command

* docs(basic): added basic docs Added simple documantation for version v1.0.0 (#30)

* feat(multicore): fixed multicore

Fixed channel for multicore tasks

* feat(multicore): fixed multicore

Fixed channel for multicore tasks
@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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant