Skip to content

Commit

Permalink
repeat btn works
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Mar 23, 2024
1 parent 807e92e commit bb4a6ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ function simulate(integrator, stopped=true)
global LAST_I
start_time_ns = time_ns()
clear_viewer(viewer)
KiteViewers.running[] = ! stopped
viewer.stop = stopped
if ! stopped
set_status(viewer, "ssParking")
end
i=1
j=0; k=0
GC.gc()
Expand Down Expand Up @@ -131,7 +136,9 @@ function play(stopped=false)
on_parking(ssc)
integrator = KiteModels.init_sim!(kps4, stiffness_factor=0.04)
toc()
println("===> stopped: $stopped")
steps = simulate(integrator, stopped)
stopped = ! viewer.sw.active[]
GC.enable(true)
end
end
Expand Down

0 comments on commit bb4a6ca

Please sign in to comment.