Commit d3f60b1c authored by Jake Read's avatar Jake Read

about to break everything

parent ab438353
......@@ -13,8 +13,47 @@ This project serves the developement environment / api we use to write and repre
![img moving](doc/images/mothermother.gif)
## For MW
- fundament
- load / save programs (req. prgmem representation)
- UI
- title bar descr. how to operate
- 'L' for load, 'M' for new module, type for module search ?
- right-click delete / copy etc
- evt line highlight on hover
- hover display type
## WRT Representations
OK
Module have
Inputs
Outputs
State (initial states are settings)
Also
Names, IDs
Paths-to-source
Modules-that-represent-remote-computing also have
Ports
that connect to
Link
To assemble a representation of these, we want to have a kind of 'netlist' that, for convenience, we'll treat like a JSON object. We want heirarchy, so consider the representation having 'top-level' outputs / inputs / state as well ?
## Programming Notes
title bar
L for load prgmem
M for add module
- once we can plan gcode sequence, work towards more
- better hardware abstraction, i.e.
stepper.port = bridge.port('0,1')
......
......@@ -136,46 +136,41 @@ PROGRAM AS API
var modules = new Array()
var test = addModule('./src/hardware/test.js')
var bridge = addModule('./src/hardware/bridge.js')
test.outputs.packet.attach(bridge.inputs.B)
bridge.outputs.B.attach(test.inputs.packet)
var t2 = addModule('./src/hardware/test.js')
var t3 = addModule('./src/hardware/test.js')
t2.outputs.packet.attach(bridge.inputs.A)
bridge.outputs.A.attach(t2.inputs.packet)
t3.outputs.packet.attach(bridge.inputs.F)
bridge.outputs.F.attach(t3.inputs.packet)
/*
var serialATKLink = addModule('./src/hardware/serialATKLink.js')
/*
var rtr = addModule('./src/hardware/atkrouter.js')
rtr.port.route = '0'
serialATKLink.attach(rtr)
var bbs = addModule('./src/hardware/atkbbbs.js')
bbs.port.route = '0,2'
serialATKLink.attach(bbs.port)
*/
bridge.init()
var plCol = 1060
setUiPos(test, plCol,718 + 200)
setUiPos(t2, plCol, 850 + 200)
setUiPos(t3, plCol, 970 + 200)
// a program is a list of modules,
// modules have internal lists of modules that they call
var prgmem = {
// we want to describe all of the nodes first,
// then we can add connections once we have hooks
// to each of them
modules: {
gate: {
path: './src/util/gate.js',
conn: {
}
ui:{
pos: [100, 100]
}
},
delay: {
path: './src/util/delay.js',
state: {
ms: 500
}
},
log: {
path: './src/util.log.js'
}
},
connections: ['gate.outputs.out', 'delay.inputs.thru']
}
var hwCol = 1629
function loadPrgmem(desc) {
console.log(desc)
}
setUiPos(bridge, hwCol,890)
loadPrgmem(prgmem)
/*
------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment