Can I enable the ContinuousCallback only on certain intervals?

Okay, I slept on it and it occurred to me that I can simply put the interval condition inside of the affect! function. So this example problem would be solved by setting this:

condition(u, t, int) = u[1] - 0.5
affect!(int) = int.t < 4 ? nothing : terminate!(int)
1 Like