Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
7d48e89d
Commit
7d48e89d
authored
May 22, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -a/--autoconnect option to Pronterface
parent
72f27a89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
pronterface.py
pronterface.py
+6
-1
No files found.
pronterface.py
View file @
7d48e89d
...
@@ -131,6 +131,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -131,6 +131,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
]
]
self
.
custombuttons
=
[]
self
.
custombuttons
=
[]
self
.
btndict
=
{}
self
.
btndict
=
{}
self
.
autoconnect
=
False
self
.
parse_cmdline
(
sys
.
argv
[
1
:])
self
.
parse_cmdline
(
sys
.
argv
[
1
:])
self
.
build_dimensions_list
=
self
.
get_build_dimensions
(
self
.
settings
.
build_dimensions
)
self
.
build_dimensions_list
=
self
.
get_build_dimensions
(
self
.
settings
.
build_dimensions
)
...
@@ -198,16 +199,20 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -198,16 +199,20 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
predisconnect_layer
=
None
self
.
predisconnect_layer
=
None
self
.
hsetpoint
=
0.0
self
.
hsetpoint
=
0.0
self
.
bsetpoint
=
0.0
self
.
bsetpoint
=
0.0
if
self
.
autoconnect
:
self
.
connect
()
if
self
.
filename
is
not
None
:
if
self
.
filename
is
not
None
:
self
.
do_load
(
self
.
filename
)
self
.
do_load
(
self
.
filename
)
def
add_cmdline_arguments
(
self
,
parser
):
def
add_cmdline_arguments
(
self
,
parser
):
pronsole
.
pronsole
.
add_cmdline_arguments
(
self
,
parser
)
pronsole
.
pronsole
.
add_cmdline_arguments
(
self
,
parser
)
parser
.
add_argument
(
'-g'
,
'--gauges'
,
help
=
_
(
"display graphical temperature gauges in addition to the temperatures graph"
),
action
=
"store_true"
)
parser
.
add_argument
(
'-g'
,
'--gauges'
,
help
=
_
(
"display graphical temperature gauges in addition to the temperatures graph"
),
action
=
"store_true"
)
parser
.
add_argument
(
'-a'
,
'--autoconnect'
,
help
=
_
(
"automatically try to connect to printer on startup"
),
action
=
"store_true"
)
def
process_cmdline_arguments
(
self
,
args
):
def
process_cmdline_arguments
(
self
,
args
):
pronsole
.
pronsole
.
process_cmdline_arguments
(
self
,
args
)
pronsole
.
pronsole
.
process_cmdline_arguments
(
self
,
args
)
self
.
display_gauges
=
args
.
gauges
self
.
display_gauges
=
args
.
gauges
self
.
autoconnect
=
args
.
autoconnect
def
startcb
(
self
):
def
startcb
(
self
):
self
.
starttime
=
time
.
time
()
self
.
starttime
=
time
.
time
()
...
@@ -1394,7 +1399,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1394,7 +1399,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
on_startprint
()
self
.
on_startprint
()
threading
.
Thread
(
target
=
self
.
getfiles
)
.
start
()
threading
.
Thread
(
target
=
self
.
getfiles
)
.
start
()
def
connect
(
self
,
event
):
def
connect
(
self
,
event
=
None
):
print
_
(
"Connecting..."
)
print
_
(
"Connecting..."
)
port
=
None
port
=
None
try
:
try
:
...
...
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