Skip to content

Commit

Permalink
adds resetNodes API call to hardwareInterfaces. pass in object and fr…
Browse files Browse the repository at this point in the history
…ame name to remove all nodes from that frame
  • Loading branch information
benptc committed May 2, 2019
1 parent efc9dfc commit d8ab539
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libraries/hardwareInterfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,18 @@ exports.removeNode = function (objectName, frameName, nodeName) {
}
};

exports.resetNodes = function (objectName, frameName) {
var objectID = utilities.getObjectIdFromTarget(objectName, objectsPath);
var frameID = objectID + frameName;
if (!_.isUndefined(objectID) && !_.isNull(objectID)) {
if (objects.hasOwnProperty(objectID)) {
if (objects[objectID].frames.hasOwnProperty(frameID)) {
objects[objectID].frames[frameID].nodes = {};
}
}
}
};

exports.attachNodeToGroundPlane = function (objectName, frameName, nodeName, shouldAttachToGroundPlane) {
var objectID = utilities.getObjectIdFromTarget(objectName, objectsPath);
var frameID = objectID + frameName;
Expand Down

0 comments on commit d8ab539

Please sign in to comment.