Compare commits

..

No commits in common. "main" and "v1.2.0" have entirely different histories.
main ... v1.2.0

2 changed files with 4 additions and 6 deletions

View File

@ -223,8 +223,8 @@ def main():
events_emits_def = [] events_emits_def = []
emit_def = "" emit_def = ""
emit_def += "void {filename}_emit{Event}({filename}* me, uint16_t t, int64_t data) {\n" emit_def += "void {filename}_emit{Event}({filename}* me, uint16_t t) {\n"
emit_def += " POST(me, &{filename}_processEvent, ev{fn}{event}, t, data);\n" emit_def += " POST(me, &{filename}_processEvent, ev{fn}{event}, t, 0);\n"
emit_def += "}" emit_def += "}"
emit_def = emit_def.replace("{filename}", fn_uc).replace("{fn}", variables["fn"]) emit_def = emit_def.replace("{filename}", fn_uc).replace("{fn}", variables["fn"])
@ -241,9 +241,8 @@ def main():
emit_dec += " * Emit the {event} event\n" emit_dec += " * Emit the {event} event\n"
emit_dec += " * @param me the {filename} itself\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 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 += " */"
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) emit_dec = emit_dec.replace("{filename}", fn_uc)
for event in events[1:]: for event in events[1:]:

View File

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