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
f0f63336
Commit
f0f63336
authored
Oct 25, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better temperature combo box behavior when heated up
parent
506d9bb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
pronsole.py
pronsole.py
+3
-3
pronterface.py
pronterface.py
+15
-0
No files found.
pronsole.py
View file @
f0f63336
...
@@ -93,9 +93,9 @@ class Settings:
...
@@ -93,9 +93,9 @@ class Settings:
self
.
port
=
""
self
.
port
=
""
self
.
baudrate
=
115200
self
.
baudrate
=
115200
self
.
temperature_pla
=
185
self
.
temperature_pla
=
185
self
.
temperature_abs
=
230
.0
self
.
temperature_abs
=
230
self
.
bedtemp_pla
=
60
.0
self
.
bedtemp_pla
=
60
self
.
bedtemp_abs
=
110
.0
self
.
bedtemp_abs
=
110
self
.
xy_feedrate
=
3000
self
.
xy_feedrate
=
3000
self
.
z_feedrate
=
200
self
.
z_feedrate
=
200
self
.
e_feedrate
=
300
self
.
e_feedrate
=
300
...
...
pronterface.py
View file @
f0f63336
...
@@ -140,6 +140,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -140,6 +140,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
starttime
=
0
self
.
starttime
=
0
self
.
curlayer
=
0
self
.
curlayer
=
0
self
.
cur_button
=
None
self
.
cur_button
=
None
self
.
hsetpoint
=
0.0
self
.
bsetpoint
=
0.0
def
startcb
(
self
):
def
startcb
(
self
):
self
.
starttime
=
time
.
time
()
self
.
starttime
=
time
.
time
()
...
@@ -202,6 +204,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -202,6 +204,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
p
.
online
:
if
self
.
p
.
online
:
self
.
p
.
send_now
(
"M104 S"
+
l
)
self
.
p
.
send_now
(
"M104 S"
+
l
)
print
_
(
"Setting hotend temperature to "
),
f
,
_
(
" degrees Celsius."
)
print
_
(
"Setting hotend temperature to "
),
f
,
_
(
" degrees Celsius."
)
self
.
hsetpoint
=
f
if
f
>
0
:
if
f
>
0
:
self
.
htemp
.
SetValue
(
l
)
self
.
htemp
.
SetValue
(
l
)
self
.
set
(
"last_temperature"
,
str
(
f
))
self
.
set
(
"last_temperature"
,
str
(
f
))
...
@@ -236,6 +239,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -236,6 +239,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
p
.
online
:
if
self
.
p
.
online
:
self
.
p
.
send_now
(
"M140 S"
+
l
)
self
.
p
.
send_now
(
"M140 S"
+
l
)
print
_
(
"Setting bed temperature to "
),
f
,
_
(
" degrees Celsius."
)
print
_
(
"Setting bed temperature to "
),
f
,
_
(
" degrees Celsius."
)
self
.
bsetpoint
=
f
if
f
>
0
:
if
f
>
0
:
self
.
btemp
.
SetValue
(
l
)
self
.
btemp
.
SetValue
(
l
)
self
.
set
(
"last_bed_temperature"
,
str
(
f
))
self
.
set
(
"last_bed_temperature"
,
str
(
f
))
...
@@ -527,6 +531,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -527,6 +531,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
htemp_choices
=
[
str
(
self
.
settings
.
last_temperature
)]
+
htemp_choices
htemp_choices
=
[
str
(
self
.
settings
.
last_temperature
)]
+
htemp_choices
self
.
htemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
self
.
htemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
htemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
60
,
25
),
pos
=
(
45
,
337
))
choices
=
htemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
60
,
25
),
pos
=
(
45
,
337
))
self
.
htemp
.
Bind
(
wx
.
EVT_COMBOBOX
,
self
.
htemp_change
)
lls
.
Add
(
self
.
htemp
,
pos
=
(
11
,
2
),
span
=
(
1
,
2
))
lls
.
Add
(
self
.
htemp
,
pos
=
(
11
,
2
),
span
=
(
1
,
2
))
self
.
settbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
36
,
-
1
),
pos
=
(
125
,
335
))
self
.
settbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
36
,
-
1
),
pos
=
(
125
,
335
))
...
@@ -546,6 +551,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -546,6 +551,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
btemp_choices
=
[
str
(
self
.
settings
.
last_bed_temperature
)]
+
btemp_choices
btemp_choices
=
[
str
(
self
.
settings
.
last_bed_temperature
)]
+
btemp_choices
self
.
btemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
self
.
btemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
btemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
60
,
25
),
pos
=
(
135
,
367
))
choices
=
btemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
60
,
25
),
pos
=
(
135
,
367
))
self
.
btemp
.
Bind
(
wx
.
EVT_COMBOBOX
,
self
.
btemp_change
)
lls
.
Add
(
self
.
btemp
,
pos
=
(
12
,
2
),
span
=
(
1
,
2
))
lls
.
Add
(
self
.
btemp
,
pos
=
(
12
,
2
),
span
=
(
1
,
2
))
self
.
setbbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
365
))
self
.
setbbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
365
))
...
@@ -633,6 +639,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -633,6 +639,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#uts.Layout()
#uts.Layout()
self
.
cbuttons_reload
()
self
.
cbuttons_reload
()
def
htemp_change
(
self
,
event
):
if
self
.
hsetpoint
>
0
:
self
.
do_settemp
(
""
)
wx
.
CallAfter
(
self
.
htemp
.
SetInsertionPoint
,
0
)
def
btemp_change
(
self
,
event
):
if
self
.
bsetpoint
>
0
:
self
.
do_bedtemp
(
""
)
wx
.
CallAfter
(
self
.
btemp
.
SetInsertionPoint
,
0
)
def
showwin
(
self
,
event
):
def
showwin
(
self
,
event
):
if
(
self
.
f
is
not
None
):
if
(
self
.
f
is
not
None
):
self
.
gwindow
.
Show
()
self
.
gwindow
.
Show
()
...
...
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