Skip to content

Commit b1feacc

Browse files
committed
switch to array param
1 parent 0223ebf commit b1feacc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PlanarMechanics/components.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Body component with mass and inertia
6363
6464
https://github.com/dzimmer/PlanarMechanics/blob/743462f58858a808202be93b708391461cbe2523/PlanarMechanics/Parts/Body.mo
6565
"""
66-
@component function Body(; name, m, I, rx = 0, ry = 0, phi = 0, gy = -9.807, radius=0.1, render=true, color=Multibody.purple)
66+
@component function Body(; name, m, I, r = zeros(2), phi = 0, gy = -9.807, radius=0.1, render=true, color=Multibody.purple)
6767
@named frame = Frame()
6868
pars = @parameters begin
6969
m = m
@@ -76,7 +76,7 @@ https://github.com/dzimmer/PlanarMechanics/blob/743462f58858a808202be93b70839146
7676

7777
vars = @variables begin
7878
f(t)[1:2]
79-
r(t)[1:2] = [rx, ry]
79+
r(t)[1:2] = r
8080
v(t)[1:2]
8181
a(t)[1:2]
8282
phi(t) = phi

0 commit comments

Comments
 (0)