Skip to content

Commit 53944e9

Browse files
committed
Add menu.jl
1 parent 60a9388 commit 53944e9

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

examples/menu.jl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using REPL.TerminalMenus
2+
3+
options = ["test_mixer2 = include(\"../test/test_mixer2.jl\")",
4+
"test_mixer3 = include(\"../test/test_mixer3.jl\")",
5+
"test_solver = include(\"../test/test_solver.jl\")",
6+
"test_lower_force1 = include(\"../test/test_lower_force1.jl\")",
7+
"test_forcespeedcontroller1 = include(\"../test/test_forcespeedcontroller1.jl\")",
8+
"test_forcespeedcontroller2 = include(\"../test/test_forcespeedcontroller2.jl\")",
9+
"quit"]
10+
11+
function example_menu()
12+
active = true
13+
while active
14+
menu = RadioMenu(options, pagesize=8)
15+
choice = request("\nChoose function to execute or `q` to quit: ", menu)
16+
17+
if choice != -1 && choice != length(options)
18+
eval(Meta.parse(options[choice]))
19+
else
20+
println("Left menu. Press <ctrl><d> to quit Julia!")
21+
active = false
22+
end
23+
end
24+
end
25+
26+
example_menu()

test/test_forcespeedcontroller2.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using Timers; tic()
88
# Test the speed controller in combination with the controller for the lower and upper force.
99
# Input: A varying wind speed. Implements the simulink block diagram, shown in
1010
# docs/force_speed_controller_test2.png
11-
using KiteControllers, ControlPlots
11+
using WinchControllers, KiteUtils, ControlPlots
1212

1313
set = deepcopy(load_settings("system.yaml"))
1414

@@ -30,7 +30,7 @@ V_WIND_MIN = 0.0 # min wind speed of test wind
3030
FREQ_WIND = 0.25 # frequency of the triangle wind speed signal
3131
BENCHMARK = false
3232

33-
include("test_utils.jl")
33+
include("test_utilities.jl")
3434

3535
STARTUP = get_startup(wcs)
3636
V_WIND = STARTUP .* get_triangle_wind(wcs)

0 commit comments

Comments
 (0)