diff --git a/README.md b/README.md index 6a0930c70b4d293616c5645b770f47da2f79c792..3d7f6d700304ccf613df73cd094ec4c505bfe63e 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,9 @@ View.assignProgram(program) ## Immediately +- ui objects ... refresh ... use state model ? +- ui objects client drop below inputs / outputs + - ui / button - would like to send board with new buck out to fab diff --git a/client/style.css b/client/style.css index 7ad87f552315c08de4042d0d1e173f90182d32fc..a06a9b955ab4e0aa5ed53f1b5f82bdc473a98914 100644 --- a/client/style.css +++ b/client/style.css @@ -45,11 +45,29 @@ body { color: #eee; } +.outputs { + width: 78px; + float: right; + margin-right: 2px; + text-align: right; + font-size: 11px; + background-color: #1a1a1a; + color: #eee; +} + .state { padding: 0 83px 0 83px; color: #eee; } +.uidiv { + width: 396px; + padding-top: 5px; + margin-left: 2px; + margin-right: 2px; + float: left; +} + textarea { resize: none; } @@ -75,16 +93,6 @@ textarea { margin-right: 0px; } -.outputs { - width: 78px; - float: right; - margin-right: 2px; - text-align: right; - font-size: 11px; - background-color: #1a1a1a; - color: #eee; -} - .clear { clear: both; } diff --git a/client/ui/multiline.js b/client/ui/multiline.js index 8f16cbe031f16721c2c432d78634afa404369731..a602147e24134d950e5c555fdf50ae224c90798e 100644 --- a/client/ui/multiline.js +++ b/client/ui/multiline.js @@ -11,7 +11,7 @@ li.appendChild(document.createElement('br')) var txtArea = document.createElement('textarea') txtArea.rows = 25 - txtArea.cols = 25 + txtArea.cols = 45 txtArea.value = '-' txtArea.addEventListener('change', function() { var data = { @@ -35,11 +35,11 @@ // upstream, and besides, wouldn't be able to get anything from // the server multiline.onMessage = function(msg) { - console.log('got message in client side ui object', msg) + //console.log('got message in client side ui object', msg) if (msg.call == 'setContents') { txtArea.value = msg.argument } else if (msg.call == 'setLabel'){ - label.innerHTML- msg.argument + label.textContent = msg.argument } else if (msg.call == 'setRows') { txtArea.rows = msg.argument } diff --git a/modules/hardware/atkbreadboardboard.js b/modules/hardware/atkbreadboardboard.js index 6a546c25a1abe8875a6c6a23f113abd1fabf24a1..ae009785e84ad53a1113ce58c2c5d7d11f3e9537 100644 --- a/modules/hardware/atkbreadboardboard.js +++ b/modules/hardware/atkbreadboardboard.js @@ -33,11 +33,18 @@ function ATKBreadBoardBoard() { // and state as well var state = atkbbb.state - state.servoButton = Button('SEND VALUE', onServoValChange) state.servoVal = 0 // 0->100 does 1 -> 2ms duty on 20ms period state.onUiChange('servoVal', onServoValChange) - state.adcButton = Button('REQUEST ADC CONVERSION', onADCRequest) + var ui = atkbbb.ui + ui.addElement('servoButton', './ui/uiButton.js', onServoValChange) + ui.servoButton.onload = function(){ + ui.servoButton.setText('click to send servo value') + } + ui.addElement('adcReqButton', './ui/uiButton.js', onADCRequest) + ui.adcReqButton.onload = function(){ + ui.adcReqButton.setText('click to request adc conversion') + } // to send things down the well, we can use // atkbbb.route.send(packet) diff --git a/modules/hardware/atkseriallink.js b/modules/hardware/atkseriallink.js index 21f88b3b9b5e4dae2be3f6171017e2d41a36f522..549c12acbb160c2d54193149085087d151444ffd 100644 --- a/modules/hardware/atkseriallink.js +++ b/modules/hardware/atkseriallink.js @@ -15,7 +15,7 @@ function ATKSerialLink() { description: { isHardware: true, isLink: true, - name: 'Serialport ATK Link', + name: 'SerialportATKLink', alt: 'window into hardware world' }, routes: new Array() diff --git a/modules/ui/multiline.js b/modules/ui/multiline.js index 3660f5cde00401231dcd11d33060a7e4599cdb4e..9c7e68725b0a97a246441de86ba7ab7b4e5e9e5b 100644 --- a/modules/ui/multiline.js +++ b/modules/ui/multiline.js @@ -36,18 +36,22 @@ function MultiLineIn() { ui.previously.onload = function(){ ui.previously.setContents('-') ui.previously.setLabel('previously:') + ui.previously.setRows(15) } ui.addElement('justNow', './ui/multiline.js', null) ui.justNow.onload = function(){ ui.justNow.setContents('-') ui.justNow.setLabel('just now:') + ui.justNow.setRows(1) } ui.addElement('incoming', './ui/multiline.js', null) ui.incoming.onload = function(){ - ui.incoming.setContents('G0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\n') + //ui.incoming.setContents('G0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\nG0 F50 X10Y10Z10\nG0 X20Y20Z0\nG0 X0\nG0 Y10\n') ui.incoming.setLabel('incoming:') + ui.incoming.setRows(50) + onLoadFile('./files/dogbone.gcode') } multilinein.inputs = { @@ -104,15 +108,12 @@ function MultiLineIn() { if (err) throw err; console.log('Loading:') console.log(data); - //state.incoming.value = data - //state.incoming = state.incoming + ui.incoming.setContents(data) }) } multilinein.load = onLoadFile - onLoadFile('./files/dogbone.gcode') - function onExternalLine(str) { // push new str to bottom of queue } diff --git a/modules/ui/number.js b/modules/ui/number.js index 00620aef30abd62ed255474599dce5c8a8e8dfe8..6f429bd749b71a77f768811b1a13655f29faa0b7 100644 --- a/modules/ui/number.js +++ b/modules/ui/number.js @@ -36,8 +36,6 @@ function uiNum() { ui.onNumberButton.setText('number out ->') } - state.button = Button('WHAM', onNumberDesire) - // inputs are required, and must be Input('type', callback) uinum.inputs = { thru: Input('any', onThruInput), // makes anything into num event diff --git a/programs.js b/programs.js index 2478362ebfa4cd82418d6801248ebaad964dd906..11d088799bc561cf286d29d4089b76fd5de35dfa 100644 --- a/programs.js +++ b/programs.js @@ -61,9 +61,15 @@ function loadModuleFromSource(program, path, id) { // state items get wrapped in a getter / setter // so that changes from internal modules can // push to UI - mod.state.init(mod.description.id, socket) + // and not all have state + if(mod.state != null){ + mod.state.init(mod.description.id, socket) + } - mod.ui.init(mod.description.id, socket) + // not all have ui, + if(mod.ui != null){ + mod.ui.init(mod.description.id, socket) + } /* for (key in mod.state) { diff --git a/programs/mm2.json b/programs/mm2.json new file mode 100644 index 0000000000000000000000000000000000000000..3f4045c076fd4151a078210edb0996372daed109 --- /dev/null +++ b/programs/mm2.json @@ -0,0 +1,150 @@ +{ + "description": { + "name": "new program", + "counter": 2 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 650, + "top": 307 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 177, + "top": 118 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 183, + "top": 545 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + } + } +} \ No newline at end of file diff --git a/programs/mm3.json b/programs/mm3.json new file mode 100644 index 0000000000000000000000000000000000000000..780ff16a123ac0770b57239a5ebd07a54b04858f --- /dev/null +++ b/programs/mm3.json @@ -0,0 +1,320 @@ +{ + "description": { + "name": "new program", + "counter": 6 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + } + } +} \ No newline at end of file diff --git a/programs/mm4.json b/programs/mm4.json new file mode 100644 index 0000000000000000000000000000000000000000..42ab30c1cbacbd50d08129c8f667296f256d6c85 --- /dev/null +++ b/programs/mm4.json @@ -0,0 +1,462 @@ +{ + "description": { + "name": "new program", + "counter": 9 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Multi-line Text Input-7": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-7", + "path": "./modules/ui/multiline.js", + "position": { + "left": 78, + "top": 172 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Gcode Parser-8": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-8", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 649, + "top": 167 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Lookahead-Motion-Planner-9": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-9", + "path": "./modules/motion/planner.js", + "position": { + "left": 1155, + "top": 168 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [] + }, + "moveComplete": { + "emits": "number", + "calls": [] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + } + } +} \ No newline at end of file diff --git a/programs/mm5.json b/programs/mm5.json new file mode 100644 index 0000000000000000000000000000000000000000..b08b3cbf9ef6266207aa29e9c66ca12198cdc43b --- /dev/null +++ b/programs/mm5.json @@ -0,0 +1,554 @@ +{ + "description": { + "name": "new program", + "counter": 12 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Multi-line Text Input-7": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-7", + "path": "./modules/ui/multiline.js", + "position": { + "left": 78, + "top": 172 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Gcode Parser-8": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-8", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 649, + "top": 167 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Lookahead-Motion-Planner-9": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-9", + "path": "./modules/motion/planner.js", + "position": { + "left": 1155, + "top": 168 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [] + }, + "moveComplete": { + "emits": "number", + "calls": [] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "number-output-10": { + "description": { + "name": "number-output", + "alt": "for clicking", + "id": "number-output-10", + "path": "./modules/ui/number.js", + "position": { + "left": 649, + "top": 626 + } + }, + "inputs": { + "thru": { + "accepts": "any" + }, + "evt": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "number", + "calls": [] + } + }, + "state": { + "number": 10 + }, + "ui": { + "onNumberButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Button-11": { + "description": { + "name": "Button", + "alt": "for clicking", + "id": "Button-11", + "path": "./modules/ui/button.js", + "position": { + "left": 651, + "top": 473 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "whammy": { + "emits": "number", + "calls": [] + } + }, + "state": {}, + "ui": { + "btn": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "delay-12": { + "description": { + "name": "delay", + "alt": "in ... out", + "id": "delay-12", + "path": "./modules/util/delay.js", + "position": { + "left": 647, + "top": 811 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [] + } + }, + "state": { + "ms": 100 + }, + "ui": {} + } + } +} \ No newline at end of file diff --git a/programs/mm6.json b/programs/mm6.json new file mode 100644 index 0000000000000000000000000000000000000000..455d6ba1d4bcc63f9231ad274882bb8783503d35 --- /dev/null +++ b/programs/mm6.json @@ -0,0 +1,583 @@ +{ + "description": { + "name": "new program", + "counter": 12 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Multi-line Text Input-7": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-7", + "path": "./modules/ui/multiline.js", + "position": { + "left": 78, + "top": 172 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [ + { + "parentId": "Gcode Parser-8", + "key": "lineIn" + } + ] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Gcode Parser-8": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-8", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 649, + "top": 167 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "instruction" + } + ] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Lookahead-Motion-Planner-9": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-9", + "path": "./modules/motion/planner.js", + "position": { + "left": 1155, + "top": 168 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [] + }, + "moveComplete": { + "emits": "number", + "calls": [] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "number-output-10": { + "description": { + "name": "number-output", + "alt": "for clicking", + "id": "number-output-10", + "path": "./modules/ui/number.js", + "position": { + "left": 649, + "top": 626 + } + }, + "inputs": { + "thru": { + "accepts": "any" + }, + "evt": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "number", + "calls": [ + { + "parentId": "Multi-line Text Input-7", + "key": "req" + } + ] + } + }, + "state": { + "number": 10 + }, + "ui": { + "onNumberButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Button-11": { + "description": { + "name": "Button", + "alt": "for clicking", + "id": "Button-11", + "path": "./modules/ui/button.js", + "position": { + "left": 651, + "top": 473 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "whammy": { + "emits": "number", + "calls": [ + { + "parentId": "number-output-10", + "key": "evt" + }, + { + "parentId": "delay-12", + "key": "thru" + } + ] + } + }, + "state": {}, + "ui": { + "btn": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "delay-12": { + "description": { + "name": "delay", + "alt": "in ... out", + "id": "delay-12", + "path": "./modules/util/delay.js", + "position": { + "left": 647, + "top": 811 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "run" + } + ] + } + }, + "state": { + "ms": 100 + }, + "ui": {} + } + } +} \ No newline at end of file diff --git a/programs/mm7.json b/programs/mm7.json new file mode 100644 index 0000000000000000000000000000000000000000..0456b0d151cb670526be01aafb70ae98bc684c80 --- /dev/null +++ b/programs/mm7.json @@ -0,0 +1,620 @@ +{ + "description": { + "name": "new program", + "counter": 12 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Multi-line Text Input-7": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-7", + "path": "./modules/ui/multiline.js", + "position": { + "left": 78, + "top": 172 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [ + { + "parentId": "Gcode Parser-8", + "key": "lineIn" + } + ] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Gcode Parser-8": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-8", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 649, + "top": 167 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "instruction" + } + ] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Lookahead-Motion-Planner-9": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-9", + "path": "./modules/motion/planner.js", + "position": { + "left": 1235, + "top": 299 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [ + { + "parentId": "ATKStepper-1", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-2", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-4", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-5", + "key": "trapezoid" + } + ] + }, + "moveComplete": { + "emits": "number", + "calls": [ + { + "parentId": "Multi-line Text Input-7", + "key": "req" + } + ] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "number-output-10": { + "description": { + "name": "number-output", + "alt": "for clicking", + "id": "number-output-10", + "path": "./modules/ui/number.js", + "position": { + "left": 649, + "top": 626 + } + }, + "inputs": { + "thru": { + "accepts": "any" + }, + "evt": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "number", + "calls": [ + { + "parentId": "Multi-line Text Input-7", + "key": "req" + } + ] + } + }, + "state": { + "number": 10 + }, + "ui": { + "onNumberButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Button-11": { + "description": { + "name": "Button", + "alt": "for clicking", + "id": "Button-11", + "path": "./modules/ui/button.js", + "position": { + "left": 651, + "top": 473 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "whammy": { + "emits": "number", + "calls": [ + { + "parentId": "number-output-10", + "key": "evt" + }, + { + "parentId": "delay-12", + "key": "thru" + } + ] + } + }, + "state": {}, + "ui": { + "btn": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "delay-12": { + "description": { + "name": "delay", + "alt": "in ... out", + "id": "delay-12", + "path": "./modules/util/delay.js", + "position": { + "left": 647, + "top": 811 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "run" + } + ] + } + }, + "state": { + "ms": 100 + }, + "ui": {} + } + } +} \ No newline at end of file diff --git a/programs/mm8.json b/programs/mm8.json new file mode 100644 index 0000000000000000000000000000000000000000..94dba1141ee797874d96536c0c33c61ea856facf --- /dev/null +++ b/programs/mm8.json @@ -0,0 +1,620 @@ +{ + "description": { + "name": "new program", + "counter": 12 + }, + "modules": { + "SerialportATKLink-0": { + "description": { + "isHardware": true, + "isLink": true, + "name": "SerialportATKLink", + "alt": "window into hardware world", + "id": "SerialportATKLink-0", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2379, + "top": 568 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-1": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-1", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 77 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 80, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-2": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-2", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1827, + "top": 499 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,3", + "rate": 2000, + "axis": "Y", + "spu": 80, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-4": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-4", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1826, + "top": 928 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,5", + "rate": 2000, + "axis": "Y", + "spu": -80, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1834, + "top": 1354 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "acks" + } + ] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,1", + "rate": 2000, + "axis": "Z", + "spu": -80, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKBBB-Servo-6": { + "description": { + "name": "ATKBBB-Servo", + "alt": "software representation of networked hardware object", + "isHardware": true, + "id": "ATKBBB-Servo-6", + "path": "./modules/hardware/atkbreadboardboard.js", + "position": { + "left": 2320, + "top": 1484 + } + }, + "inputs": { + "servoVal": { + "accepts": "number" + }, + "adcRequest": { + "accepts": "event" + } + }, + "outputs": { + "servoConf": { + "emits": "event", + "calls": [] + }, + "adcValue": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,2", + "servoVal": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "servoButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "adcReqButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Multi-line Text Input-7": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-7", + "path": "./modules/ui/multiline.js", + "position": { + "left": 78, + "top": 172 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [ + { + "parentId": "Gcode Parser-8", + "key": "lineIn" + } + ] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Gcode Parser-8": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-8", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 649, + "top": 167 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "instruction" + } + ] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Lookahead-Motion-Planner-9": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-9", + "path": "./modules/motion/planner.js", + "position": { + "left": 1235, + "top": 299 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [ + { + "parentId": "ATKStepper-1", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-2", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-4", + "key": "trapezoid" + }, + { + "parentId": "ATKStepper-5", + "key": "trapezoid" + } + ] + }, + "moveComplete": { + "emits": "number", + "calls": [ + { + "parentId": "Multi-line Text Input-7", + "key": "req" + } + ] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "number-output-10": { + "description": { + "name": "number-output", + "alt": "for clicking", + "id": "number-output-10", + "path": "./modules/ui/number.js", + "position": { + "left": 649, + "top": 626 + } + }, + "inputs": { + "thru": { + "accepts": "any" + }, + "evt": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "number", + "calls": [ + { + "parentId": "Multi-line Text Input-7", + "key": "req" + } + ] + } + }, + "state": { + "number": 10 + }, + "ui": { + "onNumberButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Button-11": { + "description": { + "name": "Button", + "alt": "for clicking", + "id": "Button-11", + "path": "./modules/ui/button.js", + "position": { + "left": 651, + "top": 473 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "whammy": { + "emits": "number", + "calls": [ + { + "parentId": "number-output-10", + "key": "evt" + }, + { + "parentId": "delay-12", + "key": "thru" + } + ] + } + }, + "state": {}, + "ui": { + "btn": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "delay-12": { + "description": { + "name": "delay", + "alt": "in ... out", + "id": "delay-12", + "path": "./modules/util/delay.js", + "position": { + "left": 647, + "top": 811 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [ + { + "parentId": "Lookahead-Motion-Planner-9", + "key": "run" + } + ] + } + }, + "state": { + "ms": 100 + }, + "ui": {} + } + } +} \ No newline at end of file diff --git a/programs/mmother-1.json b/programs/mmother-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2511ba22b4a923470aeecb6093f20b13fb1696de --- /dev/null +++ b/programs/mmother-1.json @@ -0,0 +1,408 @@ +{ + "description": { + "name": "new program", + "counter": 7 + }, + "modules": { + "Gcode Parser-0": { + "description": { + "name": "Gcode Parser", + "alt": "line of gcode -> planner recognized move", + "id": "Gcode Parser-0", + "path": "./modules/parsing/gcode.js", + "position": { + "left": 676, + "top": 96 + } + }, + "inputs": { + "lineIn": { + "accepts": "string" + } + }, + "outputs": { + "instructionOut": { + "emits": "move instruction", + "calls": [] + }, + "modeChange": { + "emits": "string", + "calls": [] + } + }, + "state": { + "mode": "G0", + "G0": 1200, + "G1": 400 + }, + "ui": {} + }, + "Multi-line Text Input-1": { + "description": { + "name": "Multi-line Text Input", + "alt": "sequential txt input", + "id": "Multi-line Text Input-1", + "path": "./modules/ui/multiline.js", + "position": { + "left": 109, + "top": 93 + } + }, + "inputs": { + "req": { + "accepts": "number" + }, + "lineIn": { + "accepts": "string" + }, + "load": { + "accepts": "path" + } + }, + "outputs": { + "lineOut": { + "emits": "string", + "calls": [] + } + }, + "state": {}, + "ui": { + "thruButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "previously": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "justNow": { + "type": "button", + "clientPath": "ui/multiline.js" + }, + "incoming": { + "type": "button", + "clientPath": "ui/multiline.js" + } + } + }, + "Lookahead-Motion-Planner-2": { + "description": { + "name": "Lookahead-Motion-Planner", + "alt": "movements -> acceleration planned moves", + "id": "Lookahead-Motion-Planner-2", + "path": "./modules/motion/planner.js", + "position": { + "left": 1223, + "top": 94 + } + }, + "inputs": { + "instruction": { + "accepts": "move instruction" + }, + "acks": { + "accepts": "move acknowledgement" + }, + "run": { + "accepts": "boolean" + } + }, + "outputs": { + "moves": { + "emits": "move instruction", + "calls": [] + }, + "moveComplete": { + "emits": "number", + "calls": [] + } + }, + "state": { + "axisIDs": "X,Y,Z", + "accel": 200, + "jd": 0.1, + "minSpeed": 1, + "position": [ + 0, + 0, + 0 + ], + "isRunning": 0, + "netWindow": 3, + "netState": [ + 0, + 0, + 0 + ] + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "startStopButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-3": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-3", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1913, + "top": 93 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "Serialport-ATK-Link-4": { + "description": { + "isHardware": true, + "isLink": true, + "name": "Serialport ATK Link", + "alt": "window into hardware world", + "id": "Serialport ATK Link-4", + "path": "./modules/hardware/atkseriallink.js", + "position": { + "left": 2477, + "top": 383 + } + }, + "inputs": {}, + "outputs": {}, + "state": { + "portName": "---", + "portStatus": "closed" + }, + "ui": { + "kickButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-5": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-5", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1917, + "top": 505 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-6": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-6", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1916, + "top": 910 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + }, + "ATKStepper-7": { + "description": { + "name": "ATKStepper", + "alt": "software representation of stepper motor", + "isHardware": true, + "id": "ATKStepper-7", + "path": "./modules/hardware/atkstepper.js", + "position": { + "left": 1919, + "top": 1319 + } + }, + "inputs": { + "trapezoid": { + "accepts": "move instruction" + }, + "accel": { + "accepts": "number" + }, + "rmtrig": { + "accepts": "event" + } + }, + "outputs": { + "ack": { + "emits": "move acknowledgement", + "calls": [] + }, + "position": { + "emits": "number", + "calls": [] + } + }, + "state": { + "message": "click below to test network", + "route": "0,0", + "rate": 2000, + "axis": "X", + "spu": 200, + "rawMove": -10, + "lead": 0, + "position": 0 + }, + "ui": { + "resetButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "testButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + }, + "rawButton": { + "type": "button", + "clientPath": "ui/uiButton.js" + } + } + } + } +} \ No newline at end of file diff --git a/src/ui/multiline.js b/src/ui/multiline.js index bb17f878ef2bf5d66259b89e0c92e88fb6664144..98c2de970a721a48f05ca54c2c8b87340e9d96c7 100644 --- a/src/ui/multiline.js +++ b/src/ui/multiline.js @@ -5,12 +5,13 @@ function Multiline() { clientPath: 'ui/multiline.js', callback: null, // this is loaded into our scope on load contents: null, // current value of multiline obj - label: null + label: null, + rows: null } // hook to recv messages from the ui counterpart multiline.onMessage = function(msg) { - console.log('message into server side object', msg) + //console.log('message into server side object', msg) if(msg == 'onload'){ this.onload() } else { @@ -27,6 +28,15 @@ function Multiline() { this.sendToUi(msg) } + multiline.setRows = function(num){ + this.rows = num + var msg = { + call: 'setRows', + argument: num + } + this.sendToUi(msg) + } + // example of a function to use within the module multiline.setContents = function(string) { this.contents = string diff --git a/src/ui/uiButton.js b/src/ui/uiButton.js index 576a3d5faa4c86b9a8e802d0a5ab23e80b4b5fd8..e85b937fc80af6774585ff73ae500efb1f3dbd41 100644 --- a/src/ui/uiButton.js +++ b/src/ui/uiButton.js @@ -9,7 +9,7 @@ function UIButton() { // hook to recv messages from the ui counterpart uiButton.onMessage = function(msg) { - console.log('message into server side object', msg) + //console.log('message into server side object', msg) if(msg == 'onload'){ this.onload() } else {