From 46a1735c0c9a0be5f2adc7baa95ad4f6515be214 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 20 Jun 2024 17:30:43 +0200 Subject: [PATCH] fix #35 --- CHANGELOG.md | 4 ++++ Project.toml | 4 ++-- examples/autopilot.jl | 4 ++-- examples/plots.jl | 8 +++++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 311b8b18..6cc85282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### KiteControllers v0.2.5 - 2024-06-20 +#### Changed +- fix #35, save the default log file in the output folder + ### KiteControllers v0.2.4 - 2024-06-18 #### Changed - add the field `corr_vec` to all `fpp_settings_xxx.yaml` files diff --git a/Project.toml b/Project.toml index d6a98663..789f990e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "KiteControllers" uuid = "b19fd437-5b3a-4cca-b199-c3ded0f20ded" authors = ["Uwe Fechner and contributors"] -version = "0.2.4" +version = "0.2.5" [deps] JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" @@ -22,7 +22,7 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" ControlPlots = "0.0.12" JLD2 = "0.4.46" KiteModels = "0.5.15" -KiteUtils = "0.6.12" +KiteUtils = "0.6.14" KiteViewers = "0.4.12" NLsolve = "4.5" NonlinearSolve = "3.10.0" diff --git a/examples/autopilot.jl b/examples/autopilot.jl index 52b2ff7d..95aaf9ab 100644 --- a/examples/autopilot.jl +++ b/examples/autopilot.jl @@ -26,7 +26,7 @@ end PROJECT=read_project() GLMakie.activate!(title = PROJECT) -DEFAULT_LOG = "last_sim_log" +DEFAULT_LOG = "output/last_sim_log" function test_observer(plot=true) log = load_log("uncorrected") @@ -283,7 +283,7 @@ function play(stopped=false) if app.set.log_level > 0 println("Saving log... $(app.logger.index)") end - save_log(app.logger, DEFAULT_LOG) + save_log(app.logger, basename(DEFAULT_LOG); path=dirname(DEFAULT_LOG)) end if @isdefined __PRECOMPILE__ break diff --git a/examples/plots.jl b/examples/plots.jl index 06a0d7ed..49ed59be 100644 --- a/examples/plots.jl +++ b/examples/plots.jl @@ -12,7 +12,13 @@ function plot_timing() nothing end -fulldir(name) = replace(dirname(name), "~" => homedir()) +function fulldir(name) + if occursin("~", name) + return replace(dirname(name), "~" => homedir()) + else + return joinpath(pwd(), dirname(name)) + end +end function plot_main() log = load_log(basename(KiteViewers.plot_file[]); path=fulldir(KiteViewers.plot_file[]))