Confirm dangerous extruder target temperatures.
Protect the user from typos in setting the extruder temp by confirming them with the user if they exceed 250.master
parent
659cc0319b
commit
786baebbf8
11
pronsole.py
11
pronsole.py
|
@ -956,6 +956,17 @@ class pronsole(cmd.Cmd):
|
||||||
l = l.replace(i, self.temps[i])
|
l = l.replace(i, self.temps[i])
|
||||||
f = float(l)
|
f = float(l)
|
||||||
if f>=0:
|
if f>=0:
|
||||||
|
if f > 250:
|
||||||
|
def confirm():
|
||||||
|
print f, " is a high temperature to set your extruder to. Are you sure you want to do that?"
|
||||||
|
y_or_n = raw_input("y/n: ")
|
||||||
|
if y_or_n == "y":
|
||||||
|
return True
|
||||||
|
elif y_or_n != "n":
|
||||||
|
return confirm()
|
||||||
|
return False
|
||||||
|
if not confirm():
|
||||||
|
return
|
||||||
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."
|
||||||
|
|
Loading…
Reference in New Issue