Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
workshop.metahoguet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
osp
workshop.metahoguet
Commits
0af2f657
Commit
0af2f657
authored
Nov 11, 2016
by
antoine
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.constantvzw.org:osp/workshop.metahoguet
parents
ecf09d9f
333954c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
plotter/api.py
plotter/api.py
+2
-2
plotter/runner.py
plotter/runner.py
+7
-4
No files found.
plotter/api.py
View file @
0af2f657
...
...
@@ -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
)
...
...
plotter/runner.py
View file @
0af2f657
...
...
@@ -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
=
Tru
e
# PLOTTER_SIGNATURE = '7550
'
#
PLOTTER_PORT= '/dev/ttyUSB0'
VIRTUAL
=
Fals
e
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment