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
7245e54b
Commit
7245e54b
authored
Jul 28, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monitor command in pronterface now toggles the checkbox and sets the interval
parent
ae81b883
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
pronterface.py
pronterface.py
+19
-2
No files found.
pronterface.py
View file @
7245e54b
...
@@ -52,6 +52,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -52,6 +52,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
statuscheck
=
False
self
.
statuscheck
=
False
self
.
tempreport
=
""
self
.
tempreport
=
""
self
.
monitor
=
0
self
.
monitor
=
0
self
.
monitor_interval
=
3
self
.
paused
=
False
self
.
paused
=
False
xcol
=
(
245
,
245
,
108
)
xcol
=
(
245
,
245
,
108
)
ycol
=
(
180
,
180
,
255
)
ycol
=
(
180
,
180
,
255
)
...
@@ -156,7 +157,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -156,7 +157,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
except
:
pass
pass
def
do_settemp
(
self
,
l
=
""
):
def
do_settemp
(
self
,
l
=
""
):
try
:
try
:
if
not
(
l
.
__class__
==
""
.
__class__
or
l
.
__class__
==
u""
.
__class__
)
or
(
not
len
(
l
)):
if
not
(
l
.
__class__
==
""
.
__class__
or
l
.
__class__
==
u""
.
__class__
)
or
(
not
len
(
l
)):
...
@@ -592,6 +592,23 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -592,6 +592,23 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
pass
self
.
Destroy
()
self
.
Destroy
()
def
do_monitor
(
self
,
l
=
""
):
if
l
.
strip
()
==
""
:
self
.
monitorbox
.
SetValue
(
not
self
.
monitorbox
.
GetValue
())
elif
l
.
strip
()
==
"off"
:
self
.
monitorbox
.
SetValue
(
False
)
else
:
try
:
self
.
monitor_interval
=
float
(
l
)
self
.
monitorbox
.
SetValue
(
self
.
monitor_interval
>
0
)
except
:
print
"Invalid period given."
self
.
setmonitor
(
None
)
if
self
.
monitor
:
print
"Monitoring printer."
else
:
print
"Done monitoring."
def
setmonitor
(
self
,
e
):
def
setmonitor
(
self
,
e
):
self
.
monitor
=
self
.
monitorbox
.
GetValue
()
self
.
monitor
=
self
.
monitorbox
.
GetValue
()
...
@@ -626,7 +643,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -626,7 +643,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
sdprinting
:
if
self
.
sdprinting
:
self
.
p
.
send_now
(
"M27"
)
self
.
p
.
send_now
(
"M27"
)
self
.
p
.
send_now
(
"M105"
)
self
.
p
.
send_now
(
"M105"
)
time
.
sleep
(
3
)
time
.
sleep
(
self
.
monitor_interval
)
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Not connected to printer."
)
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Not connected to printer."
)
except
:
except
:
pass
#if window has been closed
pass
#if window has been closed
...
...
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