Skip to content

Feat/no virtual on State Machine#581

Draft
Cantonplas wants to merge 8 commits intodevelopmentfrom
feat/no-virtual-on-sm
Draft

Feat/no virtual on State Machine#581
Cantonplas wants to merge 8 commits intodevelopmentfrom
feat/no-virtual-on-sm

Conversation

@Cantonplas
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 16:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the StateMachine implementation to remove the virtual set_on method from the IStateMachine interface and transitions from a runtime-based nested machine management approach to a compile-time tuple-based approach. The changes improve type safety and potentially performance by leveraging compile-time configuration.

Changes:

  • Removed is_on field and set_on() virtual method from StateMachine and its interface
  • Replaced FixedVector type alias with direct StaticVector usage
  • Introduced compile-time tuple-based nested machine management with NestedMachineBinding and helper functions
  • Added self-transition validation in State constructor
  • Refactored state change logic into a single perform_state_change() method
  • Updated HeapStateOrder and StackStateOrder to remove is_on checks

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
Inc/ST-LIB_LOW/StateMachine/StateMachine.hpp Core refactoring: removed is_on/set_on, replaced dynamic nested machines with compile-time tuple approach, added self-transition validation, introduced StateMachineHelper namespace
Inc/ST-LIB_LOW/StateMachine/StackStateOrder.hpp Removed is_on checks from process() and parse() methods
Inc/ST-LIB_LOW/StateMachine/HeapStateOrder.hpp Removed is_on checks from process() and parse() methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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