Skip to content

Instantly share code, notes, and snippets.

Created June 19, 2011 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/1034442 to your computer and use it in GitHub Desktop.
Save anonymous/1034442 to your computer and use it in GitHub Desktop.
//Setup join arrays for used joins monitoring and clearing
for (var join in gui.allJoins) {
joinType = gui.allJoins[join].charCodeAt(0);
joinNumber = parseInt(gui.allJoins[join].substr(1));
if ((joinType == 0x64) && (joinNumber >= self.DJoin_Low) && (joinNumber <= self.DJoin_High) && (joinNumber != self.DJoin_connectedFB) && (!self.PageJoins[gui.allJoins[join]])) { //digital
self.DJoins.push(gui.allJoins[join]);
self.ClearJoins.push({join:gui.allJoins[join], value:0});
} else if ((joinType == 0x61) && (joinNumber >= self.AJoin_Low) && (joinNumber <= self.AJoin_High)) { //analog
self.AJoins.push(gui.allJoins[join]);
self.ClearJoins.push({join:gui.allJoins[join], value:0});
} else if ((joinType == 0x73) && (joinNumber >= self.SJoin_Low) && (joinNumber <= self.SJoin_High)) { //serial
self.SJoins.push(gui.allJoins[join]);
self.ClearJoins.push({join:gui.allJoins[join], value:""});
}
}
//Clear our join ranges on the UI
self.clearJoins = function () {
self.log("Clearing Joins...",1,0);
CF.setJoins(self.ClearJoins, false);
self.log("Done Clearing Joins",0,0);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment