mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
heater: Enforce min/max_temp in heater.set_temp()
Raise an error if the user requests a temperate outside the configured min/max_temp range. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
566699f68a
commit
47f1d377f5
2 changed files with 16 additions and 3 deletions
|
@ -191,7 +191,11 @@ class GCodeParser:
|
|||
def set_temp(self, heater, params, wait=False):
|
||||
print_time = self.toolhead.get_last_move_time()
|
||||
temp = float(params.get('S', '0'))
|
||||
heater.set_temp(print_time, temp)
|
||||
try:
|
||||
heater.set_temp(print_time, temp)
|
||||
except heater.error, e:
|
||||
self.respond_error(str(e))
|
||||
return
|
||||
if wait:
|
||||
self.bg_temp(heater)
|
||||
# Individual command handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue