Skip to content

Commit

Permalink
Increment tag after mode switch rather than set to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Jun 28, 2024
1 parent eb48bae commit 33e7c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/modal_models/modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void _lf_process_mode_changes(environment_t* env, reactor_mode_state_t* states[]
if (env->modes->triggered_reactions_request) {
// Insert a dummy event in the event queue for the next microstep to make
// sure startup/reset reactions (if any) are triggered as soon as possible.
tag_t dummy_event_tag = (tag_t){.time = env->current_tag.time, .microstep = 1};
tag_t dummy_event_tag = (tag_t){.time = env->current_tag.time, .microstep = env->current_tag.microstep + 1};
pqueue_tag_insert(env->event_q, (pqueue_tag_element_t*)_lf_create_dummy_events(env, dummy_event_tag));
}
}
Expand Down

0 comments on commit 33e7c20

Please sign in to comment.