Commit 10190eac authored by Mattias Fält's avatar Mattias Fält
Browse files

Update ballandbeam.jl

parent 66cd76ae
Pipeline #578 failed with stage
......@@ -94,8 +94,11 @@ bias(p::AbstractBeamOrBallAndBeam) = p.bias
bias(p::BeamSimulator) = 0
bias(p::BallAndBeamSimulator) = 0
control(p::AbstractBeamOrBallAndBeam, u) = send(p.control,u)
function control(p::AbstractBeamOrBallAndBeam, u::AbstractArray)
length(u) == 1 || error("Process $(typeof(p)) only accepts one control signal, tried to send u=$u.")
send(p.control,u[1])
end
control(p::AbstractBeamOrBallAndBeam, u::Number) = send(p.control,u)
control(p::BeamSimulator, u) = p.s(u)
control(p::BallAndBeamSimulator, u) = error("Not yet implemented")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment