diff --git a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx index c8e0608d..497bc1bd 100644 --- a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx +++ b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx @@ -311,7 +311,7 @@ 1 - 7 + 1 0 0 1 @@ -320,7 +320,7 @@ 1 0 0 - 3 + 2 0 0 1 diff --git a/include/etl/private/ivectorpointer.h b/include/etl/private/ivectorpointer.h index 4a24a186..a24f2bad 100644 --- a/include/etl/private/ivectorpointer.h +++ b/include/etl/private/ivectorpointer.h @@ -335,15 +335,6 @@ namespace etl base_t::clear(); } - //************************************************************************* - /// Increases the size of the vector by one, but does not initialise the new element. - /// If asserts or exceptions are enabled, throws a vector_full if the vector is already full. - //************************************************************************* - void push_back() - { - base_t::push_back(); - } - //********************************************************************* /// Inserts a value at the end of the vector. /// If asserts or exceptions are enabled, emits vector_full if the vector is already full. @@ -737,15 +728,6 @@ namespace etl base_t::clear(); } - //************************************************************************* - /// Increases the size of the vector by one, but does not initialise the new element. - /// If asserts or exceptions are enabled, throws a vector_full if the vector is already full. - //************************************************************************* - void push_back() - { - base_t::push_back(); - } - //********************************************************************* /// Inserts a value at the end of the vector. /// If asserts or exceptions are enabled, emits vector_full if the vector is already full. diff --git a/include/etl/state_chart.h b/include/etl/state_chart.h index 18fab61b..486316a1 100644 --- a/include/etl/state_chart.h +++ b/include/etl/state_chart.h @@ -127,31 +127,65 @@ namespace etl //************************************************************************* /// Constructor. - /// \tparam TRANSITION_TABLE_SIZE The transition table size. - /// \param object_ A reference to the implementation object. - /// \param transition_table_ The table of transitions. - /// \param state_id_ The initial state id. + /// \param object_ A reference to the implementation object. + /// \param transition_table_begin_ The start of the table of transitions. + /// \param transition_table_end_ The end of the table of transitions. + /// \param state_id_ The initial state id. //************************************************************************* - template state_chart(TObject& object_, - const etl::array& transition_table_, + const transition* transition_table_begin_, + const transition* transition_table_end_, const state_id_t state_id_) : istate_chart(state_id_), object(object_), - transition_table(transition_table_.begin(), transition_table_.end()), + transition_table(transition_table_begin_, transition_table_end_), started(false) { } //************************************************************************* - /// Sets the state table. - /// \tparam STATE_TABLE_SIZE The state table size. - /// \param state_table_ A reference to the state table. + /// Constructor. + /// \param object_ A reference to the implementation object. + /// \param transition_table_begin_ The start of the table of transitions. + /// \param transition_table_end_ The end of the table of transitions. + /// \param state_table_begin_ The start of the state table. + /// \param state_table_end_ The end of the state table. + /// \param state_id_ The initial state id. //************************************************************************* - template - void set_state_table(const etl::array& state_table_) + state_chart(TObject& object_, + const transition* transition_table_begin_, + const transition* transition_table_end_, + const state* state_table_begin_, + const state* state_table_end_, + const state_id_t state_id_) + : istate_chart(state_id_), + object(object_), + transition_table(transition_table_begin_, transition_table_end_), + state_table(state_table_begin_, state_table_end_), + started(false) { - state_table.assign(state_table_.begin(), state_table_.end()); + } + + //************************************************************************* + /// Sets the transition table. + /// \param state_table_begin_ The start of the state table. + /// \param state_table_end_ The end of the state table. + //************************************************************************* + void set_transition_table(const transition* transition_table_begin_, + const transition* transition_table_end_) + { + transition_table.assign(transition_table_begin_, transition_table_end_); + } + + //************************************************************************* + /// Sets the state table. + /// \param state_table_begin_ The start of the state table. + /// \param state_table_end_ The end of the state table. + //************************************************************************* + void set_state_table(const state* state_table_begin_, + const state* state_table_end_) + { + state_table.assign(state_table_begin_, state_table_end_); } //************************************************************************* diff --git a/include/etl/version.h b/include/etl/version.h index 64ee56ab..569fe3f8 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -37,12 +37,12 @@ SOFTWARE. /// Definitions of the ETL version ///\ingroup utilities -#define ETL_VERSION "11.19.0" -#define ETL_VERSION_W L"11.19.0" -#define ETL_VERSION_U16 u"11.19.0" -#define ETL_VERSION_U32 U"11.19.0" -#define ETL_VERSION_MAJOR 11 -#define ETL_VERSION_MINOR 19 +#define ETL_VERSION "12.0.0" +#define ETL_VERSION_W L"12.0.0" +#define ETL_VERSION_U16 u"12.0.0" +#define ETL_VERSION_U32 U"12.0.0" +#define ETL_VERSION_MAJOR 12 +#define ETL_VERSION_MINOR 0 #define ETL_VERSION_PATCH 0 #define ETL_VERSION_VALUE ((ETL_VERSION_MAJOR * 10000) + (ETL_VERSION_MINOR * 100) + ETL_VERSION_PATCH) diff --git a/support/Release notes.txt b/support/Release notes.txt index 762780bf..7c2f5f3f 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +12.0.0 +Modified the API of etl::state_chart constructors. + =============================================================================== 11.19.0 Removed push(void) push_back(void) and push_front(void) function for containers. diff --git a/test/codeblocks/ETL.cbp b/test/codeblocks/ETL.cbp index b4a78c2f..8c0190fe 100644 --- a/test/codeblocks/ETL.cbp +++ b/test/codeblocks/ETL.cbp @@ -323,6 +323,7 @@ + diff --git a/test/test_state_chart.cpp b/test/test_state_chart.cpp index 6cfb651c..2760afd0 100644 --- a/test/test_state_chart.cpp +++ b/test/test_state_chart.cpp @@ -86,9 +86,9 @@ namespace public: MotorControl() - : state_chart(*this, transitionTable, StateId::IDLE) + : state_chart(*this, transitionTable.begin(), transitionTable.end(), StateId::IDLE) { - this->set_state_table(stateTable); + this->set_state_table(stateTable.begin(), stateTable.end()); ClearStatistics(); }