mirror of https://github.com/Desuuuu/klipper.git
heaters: Make MINIMUM optional for TEMPERATURE_WAIT command (#3674)
Signed-off-by: Justin Schuh <code@justinschuh.com>
This commit is contained in:
parent
1a9218532b
commit
a5ebe5825a
|
@ -156,9 +156,9 @@ The following standard commands are supported:
|
||||||
/tmp/heattest.txt will be created with a log of all temperature
|
/tmp/heattest.txt will be created with a log of all temperature
|
||||||
samples taken during the test.
|
samples taken during the test.
|
||||||
- `TURN_OFF_HEATERS`: Turn off all heaters.
|
- `TURN_OFF_HEATERS`: Turn off all heaters.
|
||||||
- `TEMPERATURE_WAIT SENSOR=<config_name> MINIMUM=<target> [MAXIMUM=<target>]`:
|
- `TEMPERATURE_WAIT SENSOR=<config_name> [MINIMUM=<target>] [MAXIMUM=<target>]`:
|
||||||
Wait until the given temperature sensor is at or above the given
|
Wait until the given temperature sensor is at or above the supplied
|
||||||
minumum target, and (if specified) at or below the maximum target.
|
MINIMUM and/or at or below the supplied MAXIMUM.
|
||||||
- `SET_VELOCITY_LIMIT [VELOCITY=<value>] [ACCEL=<value>]
|
- `SET_VELOCITY_LIMIT [VELOCITY=<value>] [ACCEL=<value>]
|
||||||
[ACCEL_TO_DECEL=<value>] [SQUARE_CORNER_VELOCITY=<value>]`: Modify
|
[ACCEL_TO_DECEL=<value>] [SQUARE_CORNER_VELOCITY=<value>]`: Modify
|
||||||
the printer's velocity limits. Note that one may only set values
|
the printer's velocity limits. Note that one may only set values
|
||||||
|
|
|
@ -329,8 +329,11 @@ class PrinterHeaters:
|
||||||
sensor_name = gcmd.get('SENSOR')
|
sensor_name = gcmd.get('SENSOR')
|
||||||
if sensor_name not in self.available_sensors:
|
if sensor_name not in self.available_sensors:
|
||||||
raise gcmd.error("Unknown sensor '%s'" % (sensor_name,))
|
raise gcmd.error("Unknown sensor '%s'" % (sensor_name,))
|
||||||
min_temp = gcmd.get_float('MINIMUM')
|
min_temp = gcmd.get_float('MINIMUM', float('-inf'))
|
||||||
max_temp = gcmd.get_float('MAXIMUM', float('inf'), above=min_temp)
|
max_temp = gcmd.get_float('MAXIMUM', float('inf'), above=min_temp)
|
||||||
|
if min_temp == float('-inf') and max_temp == float('inf'):
|
||||||
|
raise gcmd.error(
|
||||||
|
"Error on 'TEMPERATURE_WAIT': missing MINIMUM or MAXIMUM.")
|
||||||
if self.printer.get_start_args().get('debugoutput') is not None:
|
if self.printer.get_start_args().get('debugoutput') is not None:
|
||||||
return
|
return
|
||||||
if sensor_name in self.heaters:
|
if sensor_name in self.heaters:
|
||||||
|
|
Loading…
Reference in New Issue