Commit 0af2f657 authored by antoine's avatar antoine

Merge branch 'master' of gitlab.constantvzw.org:osp/workshop.metahoguet

parents ecf09d9f 333954c2
......@@ -33,12 +33,12 @@ app = Flask(__name__)
@app.route("/api/ploteps/")
def ploteps():
epsfile = request.args.get('epsfile')
hpglfile = './eps/{}.hpgl'.format(os.path.splitext(epsfile)[0])
hpglfile = './{}.hpgl'.format(os.path.splitext(epsfile)[0])
# converting eps to hpgl
subprocess.call([
'./eps2hpgl.sh',
'./eps/{0}'.format(epsfile)
'./{0}'.format(epsfile)
])
handle = open(hpglfile)
......
......@@ -4,15 +4,18 @@
import chiplotle
from settings import db
import time
from plottertools.memory import enlargeMemory
PLOTTER_SIGNATURE = '7595'
PLOTTER_PORT= '/dev/ttyUSB0'
VIRTUAL = True
# PLOTTER_SIGNATURE = '7550'
# PLOTTER_PORT= '/dev/ttyUSB0'
VIRTUAL = False
if VIRTUAL:
plotter = chiplotle.tools.plottertools.instantiate_virtual_plotter()
else:
plotter = chiplotle.tools.plottertools._instantiate_plotter._instantiate_plotter(PLOTTER_PORT, PLOTTER_SIGNATURE)
plotter = chiplotle.tools.plottertools.instantiate_plotters()[0]
enlargeMemory(plotter)
while True:
plotcursor = db.plots.find({'plotted': False}).sort('timestamp', 1).limit(1)
......
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