From c1a244897a93e87add37526f8f3c853bde0f6ea1 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sun, 27 Oct 2024 00:36:32 +0200 Subject: [PATCH] refactoring --- examples/minipilot.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/minipilot.jl b/examples/minipilot.jl index 9d6b6b29..226a3173 100644 --- a/examples/minipilot.jl +++ b/examples/minipilot.jl @@ -45,10 +45,10 @@ viewer::Viewer3D = Viewer3D(SHOW_KITE) PARKING::Bool = false steps = 0 -if ! @isdefined T; const T = zeros(Int64(MAX_TIME/dt)); end -if ! @isdefined DELTA_T; const DELTA_T = zeros(Int64(MAX_TIME/dt)); end -if ! @isdefined STEERING; const STEERING = zeros(Int64(MAX_TIME/dt)); end -if ! @isdefined DEPOWER_; const DEPOWER_ = zeros(Int64(MAX_TIME/dt)); end +T::Vector{Float64} = zeros(Int64(MAX_TIME/dt)) +DELTA_T::Vector{Float64} = zeros(Int64(MAX_TIME/dt)) +STEERING::Vector{Float64} = zeros(Int64(MAX_TIME/dt)) +DEPOWER_::Vector{Float64} = zeros(Int64(MAX_TIME/dt)) LAST_I::Int64=0 function simulate(integrator, stopped=true)