Skip to content
Snippets Groups Projects

Automatakit API

oy

  • not yet disconnecting events

  • some styling

  • state 'squishes' when module moved too far right

  • state 'input' length / title length for long titles ?

  • state context menu or button - like 'fire this listener' on click, or get alt description

  • bridge should be able to look for devices, test devices, and do terminal stuff

  • right-click on title of module, reload

  • for crashes etc, how can we re-start / kick serverside from the browser? some other daemon program ?

  • probably shouldn't send all of the state every time ... ?

  • althought it's nice and foolproof

  • still want more diverse html inputs ... i.e. text input with some size to it ? gcode parser for this ...

  • write in logger functions

  • i.e. module.log('whatever') is wrapped at load into console.log() and sends serverside log message as well, with ID and name

  • state variables good

  • final steps before writing gcode consumption program

  • nomenclature all over the place is spaget

  • rewriting this is a good reintroduction to project

  • cleaner replace ? wholistic replace ?

  • classes / pretty code ? find desires by using

  • any kind of save / load

  • still with script-type writable file ?

  • but largely ready to write planner, serialport and packet parsing modules, do gcode stuff

  • server modules are ground truth

  • to the client, we serve representations of these modules

  • on the client, we keep a copy of this rep , and build a UI for it, rep.ui

  • to interface, we push the rep json back and forth, mostly the rep.state object

remember

you have friends

  • bro
  • sean
  • nathan

links to things

http://designmodo.github.io/Flat-UI/

http://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage

bootstrap, numeric.js ...

http://backbonejs.org/#Events

Desires

  • load / keep state
  • run headless with view into
  • collaborative program editing would be cool
  • program save / load / edit ?

Model Consistency

In Memory: array of modules

Saved / interfaced with: json of this - so to load from this, we need paths and ids attached to each module on load time.

To wrap / add heirarchy: this json object can be loaded the same as a program, given top level inputs and outputs, and made into another require()d module.

Modules are tiny programs, specifics (inputs, outputs, state) are read by system and wrapped into UI. UI has access to write into state, and connect events together.

To wrap, we write a representation in api-type rep, with one connection. We output the 'text line' of a Terminal into the 'text input' input of a gcode parser, and see the output / state bubble through the UI.

  • to test, cleanup and write gcode obj
  • confirm state change comes down to server
  • confirm event bubbles through in server
  • push event back to server ui ? dat.updatedisplay() ?

For extra points, we read in the connection also with an SVG layer - iterating through connections of the represented program.

The RPI