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
347124df
Commit
347124df
authored
Jun 11, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Safer string handling.
parent
756fa55f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
pronsole.py
pronsole.py
+1
-1
pronterface.py
pronterface.py
+5
-5
No files found.
pronsole.py
View file @
347124df
...
@@ -858,5 +858,5 @@ if __name__=="__main__":
...
@@ -858,5 +858,5 @@ if __name__=="__main__":
interp
.
cmdloop
()
interp
.
cmdloop
()
except
:
except
:
interp
.
p
.
disconnect
()
interp
.
p
.
disconnect
()
raise
#
raise
pronterface.py
View file @
347124df
...
@@ -118,7 +118,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -118,7 +118,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
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
)):
l
=
s
elf
.
htemp
.
GetValue
()
.
split
()[
0
]
l
=
s
tr
(
self
.
htemp
.
GetValue
()
.
split
()[
0
])
l
=
l
.
lower
()
.
replace
(
","
,
"."
)
l
=
l
.
lower
()
.
replace
(
","
,
"."
)
for
i
in
self
.
temps
.
keys
():
for
i
in
self
.
temps
.
keys
():
l
=
l
.
replace
(
i
,
self
.
temps
[
i
])
l
=
l
.
replace
(
i
,
self
.
temps
[
i
])
...
@@ -138,7 +138,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -138,7 +138,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
do_bedtemp
(
self
,
l
=
""
):
def
do_bedtemp
(
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
)):
l
=
s
elf
.
btemp
.
GetValue
()
.
split
()[
0
]
l
=
s
tr
(
self
.
btemp
.
GetValue
()
.
split
()[
0
])
l
=
l
.
lower
()
.
replace
(
","
,
"."
)
l
=
l
.
lower
()
.
replace
(
","
,
"."
)
for
i
in
self
.
bedtemps
.
keys
():
for
i
in
self
.
bedtemps
.
keys
():
l
=
l
.
replace
(
i
,
self
.
bedtemps
[
i
])
l
=
l
.
replace
(
i
,
self
.
bedtemps
[
i
])
...
@@ -323,7 +323,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -323,7 +323,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
not
len
(
command
):
if
not
len
(
command
):
return
return
wx
.
CallAfter
(
self
.
logbox
.
AppendText
,
">>>"
+
command
+
"
\n
"
)
wx
.
CallAfter
(
self
.
logbox
.
AppendText
,
">>>"
+
command
+
"
\n
"
)
self
.
onecmd
(
command
)
self
.
onecmd
(
str
(
command
)
)
def
statuschecker
(
self
):
def
statuschecker
(
self
):
try
:
try
:
...
@@ -543,7 +543,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -543,7 +543,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
return
dlg
=
wx
.
TextEntryDialog
(
self
,
"Enter a target filename in 8.3 format:"
,
"Pick SD filename"
,
dosify
(
self
.
filename
))
dlg
=
wx
.
TextEntryDialog
(
self
,
"Enter a target filename in 8.3 format:"
,
"Pick SD filename"
,
dosify
(
self
.
filename
))
if
dlg
.
ShowModal
()
==
wx
.
ID_OK
:
if
dlg
.
ShowModal
()
==
wx
.
ID_OK
:
self
.
p
.
send_now
(
"M28 "
+
dlg
.
GetValue
(
))
self
.
p
.
send_now
(
"M28 "
+
str
(
dlg
.
GetValue
()
))
self
.
recvlisteners
+=
[
self
.
uploadtrigger
]
self
.
recvlisteners
+=
[
self
.
uploadtrigger
]
pass
pass
...
@@ -578,7 +578,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -578,7 +578,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
except
:
pass
pass
if
self
.
serialport
.
GetValue
()
!=
""
:
if
self
.
serialport
.
GetValue
()
!=
""
:
port
=
s
elf
.
serialport
.
GetValue
(
)
port
=
s
tr
(
self
.
serialport
.
GetValue
()
)
baud
=
115200
baud
=
115200
try
:
try
:
baud
=
int
(
self
.
baud
.
GetValue
())
baud
=
int
(
self
.
baud
.
GetValue
())
...
...
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