aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
Commit message (Collapse)AuthorAgeFilesLines
* thermistor: Fallback to using beta if Steinhart-Hart c3 is negativeKevin O'Connor2018-04-091-4/+11
| | | | | | | | If the c3 coefficient is negative it can cause the adc calculations to fail. The c3 shouldn't be negative in practice, so fallback to a simple beta calculation in that case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* thermistor: Add support for defining custom thermistorsKevin O'Connor2018-04-091-0/+26
| | | | | | Add the ability to define a new thermistor type in the config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Make sure to unregister new control class on errorKevin O'Connor2018-04-061-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Move Thermistor and Linear to their own files in extras/Kevin O'Connor2018-04-043-1/+141
| | | | | | | | Move the Thermistor code to a new thermistor.py module. Move the Linear code to a new adc_temperature.py module. This simplifies the heater.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Move adc logic into Thermistor classKevin O'Connor2018-04-041-1/+1
| | | | | | | | The Thermistor (and Linear) class should handle all the details of reading the ADC values and converting them to temperatures. So, move that logic out of the Heater() class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Add PrinterHeaters class that stores all sensors and heatersKevin O'Connor2018-04-044-8/+16
| | | | | | | | | | | | 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>
* pins: Remove module level get_printer_pins() and setup_pin() functionsKevin O'Connor2018-04-045-21/+20
| | | | | | | | Most callers did a lookup of the pins module via printer.lookup_object("pins"). Use that as the standard method and remove these less frequently used methods. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Apply bed_tilt_calibrate settings to current sessionKevin O'Connor2018-04-031-6/+15
| | | | | | | | Apply the bed tilt settings immediately after finding them. This makes it easier for users to perform automatic tilt calibration at the start of every print. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Round temperature and position to nearest whole numberKevin O'Connor2018-03-191-5/+5
| | | | | | | The "%d" formatting truncates a floating point number - use "%.0f" to show a rounded number. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Remove unneeded semicolons from fileKevin O'Connor2018-03-191-7/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Move PID calibration logic from heater.py to new fileKevin O'Connor2018-03-181-0/+127
| | | | | | | | Drop support for M303 and PID_TUNE, and replace it with a new PID_CALIBRATE command. Move the logic for this command from heater.py to a new pid_calibrate.py file in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add z_offset parameterKevin O'Connor2018-03-173-8/+12
| | | | | | | | | Move the probe_z_offset parameter from delta_calibrate and bed_tilt_calibrate to a z_offset parameter within the probe config section. It's easier to understand the z offset setting when it is in the probe config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Take into account the XY position used with z_virtual_endstopKevin O'Connor2018-03-172-8/+54
| | | | | | | | If a z_virtual_endstop is in use, then record the last XY position that is used when the Z is homed. Use that XY position to report what change is needed to the z position_endstop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Require at least 3 probing points for bed_tilt_calibrateKevin O'Connor2018-03-171-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Default z_position to the configured minimum position on Z axisKevin O'Connor2018-03-171-11/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Move pwm and digital output pins to new module in extras/Kevin O'Connor2018-03-171-0/+69
| | | | | | | | Rename the digital_output, pwm_output, and static_pwm_output config sections to output_pin and move to a new module in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* static_digital_output: Add static_digital_output section to extras/Kevin O'Connor2018-03-171-0/+17
| | | | | | | Move the code for the static_digital_output config section from chipmisc.py to a new file in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* replicape: Add config controls for the servo[01]_enable linesKevin O'Connor2018-03-171-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* verify_heater: Provide additional information on a heater errorKevin O'Connor2018-03-121-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add some hints for common errors during PROBEKevin O'Connor2018-03-121-1/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* virtual_sdcard: Fix typo in seek error handlingKevin O'Connor2018-03-121-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* verify_heater: Scale hysteresis duration checkKevin O'Connor2018-03-111-6/+7
| | | | | | | | | | 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>
* verify_heater: Change default hysteresis to 10 degreesKevin O'Connor2018-03-111-2/+2
| | | | | | | 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>
* verify_heater: Add initial support for verifying heaters and sensorsKevin O'Connor2018-03-111-0/+67
| | | | | | | Add runtime checks to heaters and temperature sensors to check for possible hardware faults. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Use separate hd44780 screen drawingKevin O'Connor2018-03-081-48/+151
| | | | | | | | Separate out the hd44780 screen drawing from the st7920 code. Use a layout that takes advantage of the 20 columns. Add custom hd44780 fonts. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Choose arrow character based on displayMarcio Teixeira2018-03-061-1/+3
| | | | | | | Choose the arrow character based on whether the display is ST7920 or HD44780. Signed-off-by: Marcio Teixeira <marcio@alephobjects.com>
* display: Add initial support for LCD screens attached to an MCUKevin O'Connor2018-03-063-0/+503
| | | | | | | | Add support for displaying basic status information on ST7920 and HD44780 based LCDs that are attached directly to a micro-controller. Signed-off-by: Marcio Teixeira <marcio@alephobjects.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mathutil: Move coordinate_descent() to new fileKevin O'Connor2018-03-043-39/+5
| | | | | | | Add a new python file (mathutil.py) and move the coordinate_descent() code to it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* virtual_sdcard: Remove trailing '*' checksum indicator from M23 commandKevin O'Connor2018-03-021-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Add a wrapper around the results of lookup_command()Kevin O'Connor2018-02-271-16/+20
| | | | | | | | Add a lookup_command() method to the SerialReader class that provides a wrapper that stores the serial and commandqueue references. This makes it easier to run the send() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ad5206: Warn if ad5206 enable pin is invertedKevin O'Connor2018-02-171-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Increase calibration log level from debug to infoKevin O'Connor2018-02-163-13/+12
| | | | | | | Output more information by default from the bed_tilt and delta_calibrate commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* virtual_sdcard: Initial support for virtual sdcardKevin O'Connor2018-02-111-0/+155
| | | | | | | | Add support for directly printing from a local file on the host. This may be useful if the host cpu is not fast enough to run OctoPrint well. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Negate parameters reported by bed_tilt_calibrateKevin O'Connor2018-02-051-1/+1
| | | | | | | | The bed_tilt_calibrate command determines the tilt of the bed. However, we need to report the tilt compensation which is the negative of the bed tilt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Introduce load_config_prefix() for modules that take parametersKevin O'Connor2018-02-0310-16/+4
| | | | | | | | Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Clarify hardware_pwm and allow cycle_time to be set on software pwmKevin O'Connor2018-01-293-14/+13
| | | | | | | | Specify hardware pwm cycle times using the same method as software pwm (in seconds, not clock ticks). Allow the fan code to be configured with an explicit cycle time even when using software pwm. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Allow moves prior to homing an axisKevin O'Connor2018-01-281-2/+15
| | | | | | | Add support for disabling homing checks via the homing_override mechanism. This may be useful to move an axis prior to homing it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Create a probe:z_virtual_endstop pinKevin O'Connor2018-01-281-1/+12
| | | | | | | Create a virtual pin that may be used as the z endstop pin on cartesian printers that use the probe in place of a z endstop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Support activate/deactivate scripts on each probeKevin O'Connor2018-01-281-0/+26
| | | | | | | | Allow a set of g-code scripts to be run on each probe invocation. This may be useful for probes that need to be setup before they are useful (eg, with servo actuated probes). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Add basic support for running custom g-code on G28Kevin O'Connor2018-01-281-0/+28
| | | | | | | | Allow users to override the behavior of G28 using a new "homing_override" config section. This may be used on printers that require specific steps during the homing process. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Add support for automatic bed tilt move transformationKevin O'Connor2018-01-281-0/+95
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta_calibrate: Add initial support for a DELTA_CALIBRATE commandKevin O'Connor2018-01-282-0/+162
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Initial support for Z-Probe hardwareKevin O'Connor2018-01-281-0/+54
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* replicape: Move the replicape code from chipmisc.py to extras directoryKevin O'Connor2018-01-281-0/+221
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ad5206: Move the ad5206 code from chipmisc.py to extras directoryKevin O'Connor2018-01-281-0/+30
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Move the servo code from chipmisc.py to extras directoryKevin O'Connor2018-01-281-0/+59
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* multi_pin: Move the multi_pin code from chipmisc.py to extras directoryKevin O'Connor2018-01-281-0/+57
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Move fan code to extras directoryKevin O'Connor2018-01-282-0/+76
| | | | | | | The print cooling fan and printer heater_fan are independent modules that can reside in the extras directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add support for dynamic loading of python modulesKevin O'Connor2018-01-281-0/+5
Check if a config section matches a python filename in the klippy/extras/ directory. If it does, load that python code to handle the config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>