Skip to content

Commit fa9a81e

Browse files
committed
update disc_unknowns copy
fix disc args
1 parent 454eaed commit fa9a81e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/systems/clock_inference.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ function generate_discrete_affect(
364364
end
365365
if !$empty_disc
366366
# NOTE: the first and third arguments to `disc` MAY NOT be aliased
367-
disc(cache, disc_unknowns, p..., t) # Cache needed for atomic state update
368-
for (val, i) in zip(cache, $disc_range)
369-
$(_set_parameter_unchecked!)(p, val, i; update_dependent = false)
370-
end
371-
# copyto!(disc_unknowns, cache)
367+
disc(cache, integrator.u, p..., t) # Cache needed for atomic state update
368+
end
369+
copyto!(disc_unknowns, cache)
370+
for (val, i) in zip(cache, $disc_range)
371+
$(_set_parameter_unchecked!)(p, val, i; update_dependent = false)
372372
end
373373
result = d2c_obs(disc_unknowns, p..., t)
374374
for (val, i) in zip(result, $disc_to_cont_idxs)

0 commit comments

Comments
 (0)