Commit Graph

9 Commits

Author SHA1 Message Date
Kevin O'Connor 857e7ed5f1 klippy: Convert printer_state("connect") to an event handler
Convert all users of the printer_state("connect") handler to register
a "klippy:connect" event handler instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-08 11:09:55 -05:00
Kevin O'Connor fb7fe282c8 klippy: Convert printer_state("shutdown") to an event handler
Convert all users of the printer_state("shutdown") handler to register
a "klippy:shutdown" event handler instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-08 10:59:43 -05:00
Kevin O'Connor 864918b1f9 verify_heater: Don't report a heater error if printer is shutdown
Don't log a heater verification error if that error is due to the
printer being shutdown for some other reason.  Those spurious error
reports can be confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 10:40:44 -04:00
Kevin O'Connor 4367a985e2 verify_heater: Disable when writing output to a debug file
Disable the verify_heater checks when debugging, as otherwise it can
cause failures when processing files in batch mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-08 23:51:41 -04:00
Kevin O'Connor aed958eb5c heater: Add PrinterHeaters class that stores all sensors and heaters
Add a PrinterHeaters class that can stores references to available
temperature sensors and stores references to instantiated heaters.

Add a extras/heater_bed.py file and delay instantiation of the
heater_bed object.  This allows the heater.py module to be imported
earlier during the setup phase, and allows the PrinterHeaters class to
be available for registering sensors and heaters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-04 23:13:53 -04:00
Kevin O'Connor 9dfe612516 verify_heater: Provide additional information on a heater error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-12 23:31:17 -04:00
Kevin O'Connor 849f4ed25f verify_heater: Scale hysteresis duration check
If a heater falls out of the target range, accumulate the temperature
differences to determine if an error should be raised.  This should
make it less likely to report an error for heaters that drift slightly
out of range, and it should make error reporting faster for heaters
that rapidly fall out of range.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-11 19:21:32 -04:00
Kevin O'Connor 57d342b455 verify_heater: Change default hysteresis to 10 degrees
A default of 4 degrees and 10 seconds may be too aggressive - change
the default to 10 degrees and 15 seconds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-11 13:29:28 -04:00
Kevin O'Connor 5208fc38ed verify_heater: Add initial support for verifying heaters and sensors
Add runtime checks to heaters and temperature sensors to check for
possible hardware faults.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-03-11 00:49:11 -05:00