Merge remote-tracking branch 'origin/development'

# Conflicts:
#	include/etl/version.h
#	support/Release notes.txt
This commit is contained in:
John Wellbelove 2018-09-18 18:39:35 +01:00
parent b47c0a6c9b
commit 65c0de9110
3 changed files with 20 additions and 10 deletions

View File

@ -45,9 +45,10 @@ namespace etl
{
public:
typedef uint32_t state_id_t;
typedef uint32_t event_id_t;
typedef int state_id_t;
typedef int event_id_t;
virtual void start(const bool on_entry_initial = true) = 0;
virtual void process_event(const event_id_t event_id) = 0;
//*************************************************************************
@ -71,6 +72,7 @@ namespace etl
}
state_id_t current_state_id; ///< The current state id.
state_id_t next_state_id; ///< The next state id.
};
//***************************************************************************
@ -273,6 +275,9 @@ namespace etl
// Shall we execute the transition?
if ((t->guard == nullptr) || ((object.*t->guard)()))
{
// Remember the next state.
next_state_id = t->next_state_id;
// Shall we execute the action?
if (t->action != nullptr)
{
@ -280,7 +285,7 @@ namespace etl
}
// Changing state?
if (current_state_id != t->next_state_id)
if (current_state_id != next_state_id)
{
const state* s;
@ -294,7 +299,7 @@ namespace etl
}
// See if we have a state item for the next state.
s = find_state(t->next_state_id);
s = find_state(next_state_id);
// If the new state has an 'on_entry' then call it.
if ((s != state_table.end()) && (s->on_entry != nullptr))
@ -302,7 +307,7 @@ namespace etl
(object.*(s->on_entry))();
}
current_state_id = t->next_state_id;
current_state_id = next_state_id;
}
t = transition_table.end();

View File

@ -37,13 +37,13 @@ SOFTWARE.
/// Definitions of the ETL version
///\ingroup utilities
#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 "12.0.1"
#define ETL_VERSION_W L"12.0.1"
#define ETL_VERSION_U16 u"12.0.1"
#define ETL_VERSION_U32 U"12.0.1"
#define ETL_VERSION_MAJOR 12
#define ETL_VERSION_MINOR 0
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_PATCH 1
#define ETL_VERSION_VALUE ((ETL_VERSION_MAJOR * 10000) + (ETL_VERSION_MINOR * 100) + ETL_VERSION_PATCH)
#endif

View File

@ -1,3 +1,8 @@
===============================================================================
12.0.1
Modified state_chart to accept recursive events.
Made start() virtual.
===============================================================================
12.0.0
Modified the API of etl::state_chart constructors.