diff --git a/modules/hardware/atkseriallink.js b/modules/hardware/atkseriallink.js index 549c12acbb160c2d54193149085087d151444ffd..4c637fe583a62452341f9ed79ab20cb51392a69f 100644 --- a/modules/hardware/atkseriallink.js +++ b/modules/hardware/atkseriallink.js @@ -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)) { diff --git a/modules/hardware/atkstepper.js b/modules/hardware/atkstepper.js index 683b972ee28489da9f31cd8474ad68ce2829ea4a..e17e81c63cc0cffd2c8b4b71fdbd652f7411d3e9 100644 --- a/modules/hardware/atkstepper.js +++ b/modules/hardware/atkstepper.js @@ -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) diff --git a/modules/parsing/gcode.js b/modules/parsing/gcode.js index ac118fb9fad30312054152a45a1bb4a984f32e0f..9c67f1abf3823448d23918c59d327a15d7c67450 100644 --- a/modules/parsing/gcode.js +++ b/modules/parsing/gcode.js @@ -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) } }