Compare commits

..

2 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -223,8 +223,8 @@ def main():
events_emits_def = []
emit_def = ""
emit_def += "void {filename}_emit{Event}({filename}* me, uint16_t t) {\n"
emit_def += " POST(me, &{filename}_processEvent, ev{fn}{event}, t, 0);\n"
emit_def += "void {filename}_emit{Event}({filename}* me, uint16_t t, int64_t data) {\n"
emit_def += " POST(me, &{filename}_processEvent, ev{fn}{event}, t, data);\n"
emit_def += "}"
emit_def = emit_def.replace("{filename}", fn_uc).replace("{fn}", variables["fn"])
@ -241,8 +241,9 @@ def main():
emit_dec += " * Emit the {event} event\n"
emit_dec += " * @param me the {filename} itself\n"
emit_dec += " * @param t time to wait in ms before triggering event\n"
emit_dec += " * @param data data to put on the event for XF\n"
emit_dec += " */\n"
emit_dec += "void {filename}_emit{Event}({filename}* me, uint16_t t);"
emit_dec += "void {filename}_emit{Event}({filename}* me, uint16_t t, int64_t data);"
emit_dec = emit_dec.replace("{filename}", fn_uc)
for event in events[1:]:

View File

@ -22,6 +22,7 @@ bool ${filename}_processEvent(Event* ev) {
${filename}* me = (${filename}*)Event_getTarget(ev);
${filename}_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case ST${fn}_INIT: