Skip to content

Commit

Permalink
Shorten nStandardMsgType to fit 15-character limit
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallpowell97 committed Mar 12, 2020
1 parent 6089826 commit 1f24ea9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions staubli_val3_driver/val3/ros_server/decodeMsgBody.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
l_bFlag=false
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
call decTrajPt(l_bFlag)
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
call decTrajPtFull(l_bFlag)
break
default
Expand All @@ -44,10 +44,10 @@
// error whilst decoding msg body...
if (rosGenericMsg.header.nCommType==2)
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
rosTrajPtAck.header.nReplyCode=2
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
rosTrajPtFAck.header.nReplyCode=2
break
default
Expand Down
4 changes: 2 additions & 2 deletions staubli_val3_driver/val3/ros_server/encodeAck.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
call encTrajPtAck()
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
call encTrajPtFAck()
break
default
Expand Down
8 changes: 4 additions & 4 deletions staubli_val3_driver/val3/ros_server/pushMotion.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
l_mTrajPt.nSequence=rosTrajPtMsg.jointTrajPt.nSeq
// ROS joint position values are in rad, but VAL3 uses degrees
Expand All @@ -43,7 +43,7 @@
l_mTrajPt.nDuration=rosTrajPtMsg.jointTrajPt.nDuration
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
l_mTrajPt.nSequence=rosTrajPtFMsg.jointTrajPtFull.nSeq
l_mTrajPt.nDuration=rosTrajPtFMsg.jointTrajPtFull.nTime
Expand Down Expand Up @@ -91,10 +91,10 @@
// thus ACK should flag FAILURE, but only if comm type is request
if(rosGenericMsg.header.nCommType==nCommType["SERVICE_REQUEST"])
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
rosTrajPtAck.header.nReplyCode=2
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
rosTrajPtFAck.header.nReplyCode=2
break
default
Expand Down
4 changes: 2 additions & 2 deletions staubli_val3_driver/val3/ros_server/recvMsgBody.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
l_bFlag=false
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
call recvTrajPt(l_bFlag)
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
call recvTrajPtFull(l_bFlag)
break
default
Expand Down
2 changes: 1 addition & 1 deletion staubli_val3_driver/val3/ros_server/ros_server.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
</Value>
</Data>
<Data name="nVel" access="private" xsi:type="array" type="num" size="2" />
<Data name="nStandardMsgType" access="private" xsi:type="collection" type="num">
<Data name="nStdMsgType" access="private" xsi:type="collection" type="num">
<Value key="JOINT_TRAJ_PT" value="11" />
<Value key="JOINT_TRAJ_PT_FULL" value="14" />
</Data>
Expand Down
4 changes: 2 additions & 2 deletions staubli_val3_driver/val3/ros_server/sendAck.pgx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
switch rosGenericMsg.header.nMsgType
case nStandardMsgType["JOINT_TRAJ_PT"]
case nStdMsgType["JOINT_TRAJ_PT"]
call sendRosMsg(siTcpIpMotion, rosTrajPtAck.prefix, rosTrajPtAck.header, rosTrajPtAck.body, nInConnFlag)
break
case nStandardMsgType["JOINT_TRAJ_PT_FULL"]
case nStdMsgType["JOINT_TRAJ_PT_FULL"]
call sendRosMsg(siTcpIpMotion, rosTrajPtFAck.prefix, rosTrajPtFAck.header, rosTrajPtFAck.body, nInConnFlag)
break
default
Expand Down

0 comments on commit 1f24ea9

Please sign in to comment.