From bb4a6ca9078e439337d188b7c27aa4298d2c13a5 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sat, 23 Mar 2024 16:37:54 +0100 Subject: [PATCH] repeat btn works --- examples/autopilot.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/autopilot.jl b/examples/autopilot.jl index 721f7979..c04940f7 100644 --- a/examples/autopilot.jl +++ b/examples/autopilot.jl @@ -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() @@ -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