Skip to content
Snippets Groups Projects
Verified Commit 20fa6fa8 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

update_walker_till_time for final timepoint

parent 75155658
No related branches found
No related tags found
No related merge requests found
......@@ -286,6 +286,7 @@ end
walk_pathway!(wait::WaitBlock, walker::PathwayWalker, pulse_effects::Vector{Symbol}, nreadout::Ref{Int}, block_start_time=0.::VariableType) = false
function walk_pathway!(ao::AbstractOverlapping, walker::PathwayWalker, pulse_effects::Vector{Symbol}, nreadout::Ref{Int}, block_start_time=0.::VariableType)
@show block_start_time, nreadout[]
current_index = nothing
current_time = block_start_time
for (index_inter, interruption) in enumerate(interruptions(ao))
......@@ -300,8 +301,9 @@ function walk_pathway!(ao::AbstractOverlapping, walker::PathwayWalker, pulse_eff
elseif (interruption.object isa InstantReadout || interruption.object isa ADC)
if length(pulse_effects) > 0
continue
elseif nreadout[] > 0
nreadout[] -= 1
end
nreadout[] -= 1
if nreadout[] > 0
continue
end
end
......@@ -314,6 +316,7 @@ function walk_pathway!(ao::AbstractOverlapping, walker::PathwayWalker, pulse_eff
end
current_index = index_inter
if length(pulse_effects) == 0 && nreadout[] == 0
update_walker_till_time!(walker, current_time)
return true
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment