gcode: Don't report an error if turning off an unknown fan or heater
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
31ca2331d2
commit
fc9fb7473c
|
@ -204,11 +204,12 @@ class GCodeParser:
|
|||
self.respond(self.get_temp())
|
||||
eventtime = self.reactor.pause(eventtime + 1.)
|
||||
def set_temp(self, heater, params, wait=False):
|
||||
temp = self.get_float('S', params, 0.)
|
||||
if heater is None:
|
||||
if temp > 0.:
|
||||
self.respond_error("Heater not configured")
|
||||
return
|
||||
print_time = self.toolhead.get_last_move_time()
|
||||
temp = self.get_float('S', params, 0.)
|
||||
try:
|
||||
heater.set_temp(print_time, temp)
|
||||
except heater.error, e:
|
||||
|
@ -218,6 +219,7 @@ class GCodeParser:
|
|||
self.bg_temp(heater)
|
||||
def set_fan_speed(self, speed):
|
||||
if self.fan is None:
|
||||
if speed:
|
||||
self.respond_info("Fan not configured")
|
||||
return
|
||||
print_time = self.toolhead.get_last_move_time()
|
||||
|
|
Loading…
Reference in New Issue