fixTemplate #2

Merged
HEL merged 2 commits from fixTemplate into main 2023-07-11 20:59:07 +00:00
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,9 @@ void ${filename}_startBehaviour(${filename}* me){
bool ${filename}_processEvent(Event* ev) { bool ${filename}_processEvent(Event* ev) {
bool processed = false; bool processed = false;
${filename}* me = (${filename}*)Event_getTarget(ev); ${filename}* me = (${filename}*)Event_getTarget(ev);
${filename}_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
switch (me->state) { // onState switch (me->state) { // onState
case ST${fn}_INIT: case ST${fn}_INIT:
if (ev->id == ev${fn}init) { if (ev->id == ev${fn}init) {

View File

@ -10,6 +10,7 @@
#include "../xf/xf.h" #include "../xf/xf.h"
typedef enum { typedef enum {
ST${fn}_INIT,
${STATES_ENUM} ${STATES_ENUM}
} ${filename}_STATES; } ${filename}_STATES;