Skip to content

Commit 11b105c

Browse files
committed
Fix ControlSystem
1 parent 02a02c5 commit 11b105c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/control/controlsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ end
9191
ControlToExpr(@nospecialize(sys)) = ControlToExpr(sys,states(sys),controls(sys))
9292
function (f::ControlToExpr)(O::Term)
9393
res = if isa(O.op, Sym)
94-
any(isequal(O), f.states) && return O.op.name # dependent variables
95-
any(isequal(O), f.controls) && return O.op.name # control variables
94+
# normal variables and control variables
95+
(any(isequal(O), f.states) || any(isequal(O), f.controls)) && return tosymbol(O)
9696
build_expr(:call, Any[O.op.name; f.(O.args)])
9797
else
9898
build_expr(:call, Any[Symbol(O.op); f.(O.args)])

0 commit comments

Comments
 (0)