From ff808f03eb428bfa7a21f26e3db6085ae49380c5 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 20 Jun 2024 15:43:31 +0200 Subject: [PATCH] new constant DEFAULT_LOG --- examples/autopilot.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/autopilot.jl b/examples/autopilot.jl index 625d1ef6..52b2ff7d 100644 --- a/examples/autopilot.jl +++ b/examples/autopilot.jl @@ -26,6 +26,7 @@ end PROJECT=read_project() GLMakie.activate!(title = PROJECT) +DEFAULT_LOG = "last_sim_log" function test_observer(plot=true) log = load_log("uncorrected") @@ -269,7 +270,7 @@ function play(stopped=false) if ! app.initialized init(app) end - KiteViewers.plot_file[]="last_sim_log" + KiteViewers.plot_file[]=DEFAULT_LOG on_parking(app.ssc) integrator = KiteModels.init_sim!(app.kps4, stiffness_factor=0.5) if app.run == 0; toc(); end @@ -278,11 +279,11 @@ function play(stopped=false) app.initialized = false stopped = ! app.viewer.sw.active[] if app.logger.index > 100 - KiteViewers.plot_file[]="last_sim_log" + KiteViewers.plot_file[]=DEFAULT_LOG if app.set.log_level > 0 println("Saving log... $(app.logger.index)") end - save_log(app.logger, "last_sim_log") + save_log(app.logger, DEFAULT_LOG) end if @isdefined __PRECOMPILE__ break