Skip to content

Commit b2f2d85

Browse files
committed
make wrappers 2ccallable again
1 parent 4f3e47d commit b2f2d85

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/juliac/juliac_pid.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ const pid = DiscretePIDs.DiscretePID(; K = T(1), Ti = 1, Td = false, Ts = 1)
1313
DiscretePIDs.calculate_control!(pid, r, y, uff)::T
1414
end
1515

16-
function set_K!(K::T, r::T, y::T)::Cvoid
16+
@ccallable function set_K!(K::T, r::T, y::T)::Cvoid
1717
DiscretePIDs.set_K!(pid, K, r, y)
1818
nothing
1919
end
2020

21-
function set_Ti!(Ti::T)::Cvoid
21+
@ccallable function set_Ti!(Ti::T)::Cvoid
2222
DiscretePIDs.set_Ti!(pid, Ti)
2323
nothing
2424
end
2525

26-
function set_Td!(Td::T)::Cvoid
26+
@ccallable function set_Td!(Td::T)::Cvoid
2727
DiscretePIDs.set_Td!(pid, Td)
2828
nothing
2929
end
@@ -33,13 +33,13 @@ end
3333
nothing
3434
end
3535

36-
@ccallable function main()::Cint
37-
println(Core.stdout, "I'm alive and well")
38-
u = calculate_control!(0.0, 0.0, 0.0)
39-
println(Core.stdout, u)
36+
# @ccallable function main()::Cint
37+
# println(Core.stdout, "I'm alive and well")
38+
# u = calculate_control!(0.0, 0.0, 0.0)
39+
# println(Core.stdout, u)
4040

41-
Cint(0)
42-
end
41+
# Cint(0)
42+
# end
4343

4444

4545
end

0 commit comments

Comments
 (0)