Skip to content
Snippets Groups Projects
Commit 3a6268c3 authored by Jake Read's avatar Jake Read
Browse files

OK

parent 8ee96cc8
No related branches found
No related tags found
No related merge requests found
......@@ -15,27 +15,15 @@ This project serves the developement environment / api we use to write and repre
## For MW
- rick click on menu bar to delete module
- delete module ? then we're done ...
- walk program units and change
- what program units do we want?
- try demo machine setup ... want flow control,
- jogging, etc ... keydown units ?
- documentation
- upd8ts to modules:
- rename inout to jsunit
- buttons get onClick evt
- make hardware link / ports work / hardware type
- what program units do we want?
- try demo machine setup ... want flow control, better planning, this is actually a big thing
- jogging, etc ... keydown modules ?
- as you test, to track,
- weird state types solution: arrays, numbers, buttons, etc ?
- UI desires
- off-screen divs get pointers-to so that we don't get lost
- 'h' or something to zoom-to-extents
## Documentation
- GIFS
- load a program
- drag around
......@@ -46,10 +34,6 @@ This project serves the developement environment / api we use to write and repre
- rm modules
- change settings
- next spiral
- programs come in chunk-wise and get placed
- programs are modules are heirarchical
## Questionable Moves
- module deletion seems unclean
- input / output objects should be able to unhook themselves:
......@@ -57,7 +41,7 @@ This project serves the developement environment / api we use to write and repre
## WRT Representations
OK
OK, should write this out properly at some point.
Module have
Inputs
......@@ -75,19 +59,13 @@ Modules-that-represent-remote-computing also have
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
### 15 Minute Tasks
- @ views.js, uiRequestModuleMenu and uiRequestProgramMenu don't properly build trees from folder structure. similarly, reciprical fn's in client.js do the same
- @ these load / save functions could also reach into the modules' source to retrieve their proper names, as spec'd in description ...
- 's' for save program uses hack-asf DOM alert to ask for path
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')
......@@ -113,6 +91,8 @@ M for add module
## Want
- log() for logs-from-module tagged
- off-screen divs get pointers-to so that we don't get lost
- 'h' or something to zoom-to-extents
## Demo Desires
- want to show immediacy of hardware: software representation
......
// boilerplate atkapi header
const InOut = require('../../lib/inout.js')
const InOut = require('../../lib/jsunit.js')
let Input = InOut.Input
let Output = InOut.Output
......@@ -28,12 +28,11 @@ function ATKBridge() {
state.rF = '0,5'
state.rG = '0'
state.findPort = Button('click to find atk port')
state.findPort = Button('click to find atk port', findPort)
state.portName = '---'
state.connect = Button('click to connect')
state.connect = Button('click to connect', openPort)
state.portStatus = 'closed' // or we hope it will be
state.terminal = 'address | key:values'
state.sendRawPacket = Button('sendRaw')
/*
------------------------------------------------------
......@@ -43,8 +42,6 @@ function ATKBridge() {
port = null
state.onChange('findPort', findPort)
function findPort() {
serialport.list(function(err, ports) {
ports.forEach(function(port) {
......@@ -57,7 +54,6 @@ function ATKBridge() {
})
}
state.onChange('connect', openPort)
bridge.init = openPort
function openPort() {
......@@ -128,20 +124,6 @@ function ATKBridge() {
})
}
state.onChange('sendRawPacket', function() {
if (parseTerminal(state.terminal)) {
state.sendRawPacket.isPressed = false
} else {
state.terminal = 'not parsed successfully'
state.sendRawPacket.isPressed = false
}
})
function parseTerminal(str) {
console.log("BRIDGE TERMINAL PARSE NOT YET")
return false
}
function onSoftwareInput(key, pckt) {
// it would be responsible to check this over now, but hey
var packet = JSON.parse(JSON.stringify(pckt))
......
// boilerplate atkapi header
const InOut = require('../../lib/inout.js')
const InOut = require('../../lib/jsunit.js')
let Input = InOut.Input
let Output = InOut.Output
......@@ -28,16 +28,11 @@ function Stepper() {
state.spu = 200 // steps per unit
state.rawMove = -10
state.makeMove = Button('test move')
state.makeMove = Button('test move', onRawMove)
state.lead = 0
state.position = 0 // in steps
state.onChange('makeMove', function() {
onRawMove()
state.makeMove.isPressed = false
})
stepper.inputs = {
move: Input('move instruction', onNewInstruction),
packet: Input('headless packet', onHardwareIn),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment