fix template for processEvent

This commit is contained in:
Rémi Heredero 2023-07-11 19:00:15 +02:00
parent a5e9193217
commit 3678c0043f

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) {
@ -59,4 +62,4 @@ ${EVENTS_EMITS_DEF}
* SETTERS * * SETTERS *
***********/ ***********/
${VARS_SETTERS_DEF} ${VARS_SETTERS_DEF}