Commit 19fc40b3 authored by Jake Read's avatar Jake Read

more verbose

parent 67c86147
......@@ -21,6 +21,9 @@ function ATKSerialLink() {
routes: new Array()
}
// log more
var verbose = false
atkSerialLink.state = State()
var state = atkSerialLink.state
......@@ -104,7 +107,7 @@ function ATKSerialLink() {
atkSerialLink.send = function(msg, route) {
// it would be responsible to check this over now, but hey
console.log('send', msg, 'on', route.route)
if(verbose) console.log('send', msg, 'on', route.route)
// dereference this
var pckt = JSON.parse(JSON.stringify(msg))
if (Array.isArray(pckt)) {
......
......@@ -103,7 +103,7 @@ function Stepper() {
}
}
if (altAxis != null) {
console.log('ALTAXIS', altAxis)
if(verbose) console.log('ALTAXIS', altAxis)
var axisMove = pullAxis(move, i)
axisMove.isWait = true
sendToHardware(axisMove)
......
......@@ -13,6 +13,9 @@ function Gcode() {
}
}
// log more
var verbose = false
// one caveat here is that we can't dynamically add objects to this,
// or they don't get getter / settered when we do
gcode.state = State()
......@@ -33,10 +36,10 @@ function Gcode() {
function onLineIn(str){
var instruction = parseGcode(str)
if (instruction.hasMove) {
console.log('GCODE:', instruction)
if(verbose) console.log('GCODE:', instruction)
gcode.outputs.instructionOut.emit(instruction)
} else {
console.log('GCODE:', gcode.state.mode)
if(verbose) console.log('GCODE:', gcode.state.mode)
gcode.outputs.modeChange.emit(gcode.state.mode)
}
}
......
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