You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After being present once the is_present always returns true even if the logical action did not trigger.
Example:
target C {
timeout: 7 msecs,
fast: true
}
main reactor {
logical action a;
logical action b;
reaction(startup) -> a {=
lf_schedule(a, MSEC(1));
=}
reaction(a, b) -> a, b {=
if (a->is_present) {
printf("A");
lf_schedule(b, MSEC(2));
}
if (b->is_present) {
printf("B");
lf_schedule(a, MSEC(1));
}
printf(" at %d msecs with triggers (%d,%d)\n", lf_time_logical_elapsed() / MSEC(1), a->is_present, b->is_present);
=}
}
Output (VS Code v0.7.3):
A at 1 msecs with triggers (1,0)
AB at 3 msecs with triggers (1,1)
AB at 4 msecs with triggers (1,1)
AB at 5 msecs with triggers (1,1)
AB at 6 msecs with triggers (1,1)
AB at 7 msecs with triggers (1,1)
Expected behavior: A and B should alternate with different offsets.
The text was updated successfully, but these errors were encountered:
After being present once the
is_present
always returnstrue
even if the logical action did not trigger.Example:
Output (VS Code v0.7.3):
Expected behavior:
A
andB
should alternate with different offsets.The text was updated successfully, but these errors were encountered: