Skip to content

Commit

Permalink
new constant DEFAULT_LOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Jun 20, 2024
1 parent ad68d98 commit ff808f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ff808f0

Please sign in to comment.