Skip to content

Commit fb08987

Browse files
committed
Make mdh property public readable (not ideal)
MEX file access this mdh property, rather than calling ismdh() method (slow, ugly)
1 parent 0f35e0b commit fb08987

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

@SerialLink/SerialLink.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,13 @@
184184
end
185185

186186
properties (SetAccess = private)
187+
% needs to be public readable for access by MEX file
187188
n
188189
links
189190
T
190-
end
191-
192-
properties (Access = private)
193191
mdh
194192
end
193+
195194

196195
properties (Dependent = true, SetAccess = private)
197196
config

mex/frne.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,11 @@ mexFunction(
254254
/*
255255
* rotate gravity if base transform is set
256256
*/
257-
//robot.dhtype = mstruct_getint(mx_robot, 0, "mdh");
258-
{
259-
mxArray *lhs[1];
260-
mexCallMATLAB(1, lhs, 1, prhs, "ismdh");
261-
robot.dhtype = (int) mxGetScalar(lhs[0]);
262-
//mexPrintf("dhtype = %d\n", robot.dhtype);
263-
}
257+
258+
/*
259+
* get MDH flag
260+
*/
261+
robot.dhtype = mstruct_getint(mx_robot, 0, "mdh");
264262

265263
/* build link structure */
266264
robot.links = (Link *)mxCalloc((mwSize) njoints, (mwSize) sizeof(Link));

0 commit comments

Comments
 (0)