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
87ef3e6e
Commit
87ef3e6e
authored
Nov 15, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide temperature gauge until better place is found for it
parent
16fb5176
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
pronterface.py
pronterface.py
+17
-17
No files found.
pronterface.py
View file @
87ef3e6e
...
...
@@ -187,7 +187,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
p
.
send_now
(
"M104 S"
+
l
)
print
_
(
"Setting hotend temperature to "
),
f
,
_
(
" degrees Celsius."
)
self
.
hsetpoint
=
f
self
.
tgauge
.
SetTarget
(
int
(
f
))
#
self.tgauge.SetTarget(int(f))
if
f
>
0
:
self
.
htemp
.
SetValue
(
l
)
self
.
set
(
"last_temperature"
,
str
(
f
))
...
...
@@ -440,13 +440,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
uts
.
Add
(
self
.
resetbtn
)
self
.
minibtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Mini mode"
),
pos
=
(
690
,
0
))
self
.
minibtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
toggleview
)
self
.
tgauge
=
TempGauge
(
self
.
panel
,
size
=
(
300
,
24
))
def
scroll_setpoint
(
e
):
if
e
.
GetWheelRotation
()
>
0
:
self
.
do_settemp
(
str
(
self
.
hsetpoint
+
1
))
elif
e
.
GetWheelRotation
()
<
0
:
self
.
do_settemp
(
str
(
max
(
0
,
self
.
hsetpoint
-
1
)))
self
.
tgauge
.
Bind
(
wx
.
EVT_MOUSEWHEEL
,
scroll_setpoint
)
#
self.tgauge=TempGauge(self.panel,size=(300,24))
#
def scroll_setpoint(e):
#
if e.GetWheelRotation()>0:
#
self.do_settemp(str(self.hsetpoint+1))
#
elif e.GetWheelRotation()<0:
#
self.do_settemp(str(max(0,self.hsetpoint-1)))
#
self.tgauge.Bind(wx.EVT_MOUSEWHEEL,scroll_setpoint)
uts
.
Add
((
10
,
-
1
))
self
.
monitorbox
=
wx
.
CheckBox
(
self
.
panel
,
-
1
,
""
,
pos
=
(
450
,
37
))
...
...
@@ -457,7 +457,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
uts
.
Add
((
15
,
-
1
),
flag
=
wx
.
EXPAND
)
uts
.
Add
(
self
.
minibtn
)
uts
.
Add
(
self
.
tgauge
)
#
uts.Add(self.tgauge)
#SECOND ROW
ubs
=
self
.
upperbottomsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
...
...
@@ -1081,10 +1081,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
string
+=
(
self
.
tempreport
.
replace
(
"
\r
"
,
""
)
.
replace
(
"T"
,
_
(
"Hotend"
))
.
replace
(
"B"
,
_
(
"Bed"
))
.
replace
(
"
\n
"
,
""
)
.
replace
(
"ok "
,
""
))
+
" "
wx
.
CallAfter
(
self
.
tempdisp
.
SetLabel
,
self
.
tempreport
.
strip
()
.
replace
(
"ok "
,
""
))
try
:
self
.
tgauge
.
SetValue
(
int
(
filter
(
lambda
x
:
x
.
startswith
(
"T:"
),
self
.
tempreport
.
split
())[
0
]
.
split
(
":"
)[
1
]))
except
:
pass
#
try:
#
self.tgauge.SetValue(int(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1]))
#
except:
#
pass
if
self
.
sdprinting
:
string
+=
_
(
" SD printing:
%04.2
f
%%
"
)
%
(
self
.
percentdone
,)
if
self
.
p
.
printing
:
...
...
@@ -1122,10 +1122,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
"T:"
in
l
:
self
.
tempreport
=
l
wx
.
CallAfter
(
self
.
tempdisp
.
SetLabel
,
self
.
tempreport
.
strip
()
.
replace
(
"ok "
,
""
))
try
:
self
.
tgauge
.
SetValue
(
int
(
filter
(
lambda
x
:
x
.
startswith
(
"T:"
),
self
.
tempreport
.
split
())[
0
]
.
split
(
":"
)[
1
]))
except
:
pass
#
try:
#
self.tgauge.SetValue(int(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1]))
#
except:
#
pass
tstring
=
l
.
rstrip
()
#print tstring
if
(
tstring
!=
"ok"
):
...
...
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