Skip to content

Commit

Permalink
restore time_lapse in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Apr 21, 2024
1 parent 7041b76 commit e7f509e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@ function init(app::KiteApp; init_viewer=false)
app.viewer.menu_rel_tol.options[]=["0.005","0.001","0.0005","0.0001","0.00005", "0.00001",
"0.000005","0.000001"]
app.viewer.menu_time_lapse.options[]=["1x","2x","3x","4x","6x","9x","12x"]
if app.set.time_lapse==12.0
app.viewer.menu_time_lapse.i_selected[] = 7
elseif app.set.time_lapse==9.0
app.viewer.menu_time_lapse.i_selected[] = 6
elseif app.set.time_lapse==6.0
app.viewer.menu_time_lapse.i_selected[] = 5
elseif app.set.time_lapse==4.0
app.viewer.menu_time_lapse.i_selected[] = 4
elseif app.set.time_lapse==3.0
app.viewer.menu_time_lapse.i_selected[] = 3
elseif app.set.time_lapse==2.0
app.viewer.menu_time_lapse.i_selected[] = 2
elseif app.set.time_lapse==1.0
app.viewer.menu_time_lapse.i_selected[] = 1
else
println("Warning: Invalid setting for time_lapse in config file.")
end
app.viewer.t_sim.displayed_string[]=repr(Int64(round(app.set.sim_time)))
end
app.steps = Int64(app.max_time/app.dt)
Expand Down

0 comments on commit e7f509e

Please sign in to comment.