Skip to content

Instantly share code, notes, and snippets.

View fpillet's full-sized avatar

Florent Pillet fpillet

View GitHub Profile
@fpillet
fpillet / MyBuffer.js
Created November 2, 2011 09:26 — forked from anonymous/MyBuffer.js
Array to String
var MyModule = {
var self = {
buffer : "",
defaultSize : 20,
carriageReturn : "99"
},
setup : function() {
// we could remove this function if there is nothing to do
},
@fpillet
fpillet / gist:1034444
Created June 19, 2011 16:22 — forked from anonymous/CIP.js
alljoins.js
//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]);