From 7088dd23eadae9b24df1563851515b5e2bcbd895 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 5 Sep 2024 11:49:27 +0200 Subject: [PATCH] fix tests --- test/test_speedcontroller1.jl | 3 ++- test/test_speedcontroller2.jl | 3 ++- test/test_winchcontroller.jl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test_speedcontroller1.jl b/test/test_speedcontroller1.jl index 4c892fbe..1075959d 100644 --- a/test/test_speedcontroller1.jl +++ b/test/test_speedcontroller1.jl @@ -10,6 +10,7 @@ using Timers; tic() # docs/speed_controller_test1.png using KiteControllers, ControlPlots, BenchmarkTools +set = deepcopy(load_settings("system.yaml")) wcs = WCSettings() DURATION = 10.0 @@ -29,7 +30,7 @@ V_SET_OUT = zeros(SAMPLES) FORCE = zeros(SAMPLES) ACC = zeros(SAMPLES) ACC_SET = zeros(SAMPLES) -winch = Winch(wcs) +winch = Winch(wcs, set) pid1 = SpeedController(wcs) set_v_set(pid1, -0.5) set_tracking(pid1, -0.5) diff --git a/test/test_speedcontroller2.jl b/test/test_speedcontroller2.jl index edcf6728..f28b2899 100644 --- a/test/test_speedcontroller2.jl +++ b/test/test_speedcontroller2.jl @@ -11,6 +11,7 @@ using Timers; tic() # docs/speed_controller_test2.png using KiteControllers, ControlPlots, BenchmarkTools +set = deepcopy(load_settings("system.yaml")) wcs = WCSettings() DURATION = 10.0 @@ -30,7 +31,7 @@ V_SET_OUT = zeros(SAMPLES) FORCE = zeros(SAMPLES) ACC = zeros(SAMPLES) ACC_SET = zeros(SAMPLES) -winch = Winch(wcs) +winch = Winch(wcs, set) calc = CalcVSetIn(wcs) pid1 = SpeedController(wcs) set_tracking(pid1, 0) diff --git a/test/test_winchcontroller.jl b/test/test_winchcontroller.jl index fba07000..8b69e314 100644 --- a/test/test_winchcontroller.jl +++ b/test/test_winchcontroller.jl @@ -34,7 +34,7 @@ RESET, ACTIVE, F_SET = zeros(SAMPLES), zeros(SAMPLES), zeros(SAMPLES) STATE = zeros(Int64, SAMPLES) # create and initialize winch controller wc = WinchController(wcs) -winch = KiteControllers.Winch(wcs) +winch = KiteControllers.Winch(wcs, set) f_low = wcs.f_low for i in 1:SAMPLES