aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
Commit message (Collapse)AuthorAgeFilesLines
...
* klippy: Allow each module to define their config sectionsKevin O'Connor2017-06-091-0/+5
| | | | | | | | Create add_printer_objects() functions in the fan, heater, extruder, and toolhead modules. Create the necessary printer component objects from this call instead of placing the code directly in klippy.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Support minimum/maximum value checks on configuration variablesKevin O'Connor2017-04-111-9/+10
| | | | | | | Verify that numeric parameters are in a sane range when reading the config. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Force set_pwm of zero when target_temp is zeroKevin O'Connor2017-03-161-8/+5
| | | | | | | | | | | | Fix a corner case where a residual in the PID could cause a non-zero pwm request even when the target_temp is zero. (Which could lead to a firmware "Missed scheduling of next pwm event" shutdown.) Simplify the logic for suppressing duplicate pwm updates and make sure a zero target_temp always results in a zero pwm update on the following set_pwm calculation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Add support for AD595 type sensorsKevin O'Connor2017-03-131-6/+22
| | | | | | | Add support for sensor chips that produce a voltage that linearly scales with temperature. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Rename thermistor_type config name to sensor_typeKevin O'Connor2017-03-131-7/+8
| | | | | | | | Rename the thermistor_type and thermistor_pin config variables to sensor_type and sensor_pin. This is in preparation for support of sensors beyond thermistors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Handle case where min adc value is less than max adc valueKevin O'Connor2017-03-131-5/+4
| | | | | | | When using a sensor that isn't a thermisistor, the maximum and minimum adc values may be swapped - handle that case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Eliminate high-level build_config phaseKevin O'Connor2017-03-131-22/+17
| | | | | | | | | | Now that the mcu objects can be created prior to connecting to the mcu, it is no longer necessary to separate the init and build_config phases in the high-level code. Move the mcu objection creation from the build_config phase to the init phase and eliminate the build_config phase. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Default to using software PWMKevin O'Connor2017-03-081-1/+2
| | | | | | | Not all hardware has PWM support and there is no compelling reason to use hardware PWM for fans. Change the default to use software PWM. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Support max_power setting for heatersKevin O'Connor2017-03-031-22/+24
| | | | | | | | Change the mcu PWM value from an integer (0-255) to a float (0. - 1.). Add support for limiting the maximum power (as measured over a sufficiently long duration) to a particular heater. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Enforce min/max_temp in heater.set_temp()Kevin O'Connor2017-02-211-2/+11
| | | | | | | 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>
* heater: Resend PWM values even if last value was zeroKevin O'Connor2017-01-121-3/+4
| | | | | | | | | Continue to resend the pwm value even if the last value was zero - this extends the debugging info. Also, add the target temperature to the pwm debugging. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Only create a soft PWM object for PID heatersKevin O'Connor2017-01-101-3/+9
| | | | | | | The "watermark" style heater only needs a digital_out pin - not a software PWM pin. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Report last temperature in PWM debuggingKevin O'Connor2017-01-101-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add ConfigWrapper.getchoice methodKevin O'Connor2016-11-301-3/+2
| | | | | | | | Add helper function that ensures a config option is one of several choices. This helps ensure that a proper error is raised if an invalid choice is made. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Rename output_file_mode variable to is_fileoutputKevin O'Connor2016-11-291-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Handle adc initialization entirely in mcu codeKevin O'Connor2016-11-291-3/+1
| | | | | | | | Don't expose the ADC initialization to the gcode and heater code - instead, register a callback within the MCU_adc class and call it directly from the MCU class after configuration completes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Do not require target temperature be above min_extrude_tempKevin O'Connor2016-11-081-5/+2
| | | | | | | | | | Only disable the extruder if the last measured temperature is below the minimum extrude temperature setting. Verifying the target temperature is not necessary, and it can incorrectly prevent some valid moves. It's not uncommon for scripts to retract filament immiedietly after setting the extruder temperature to zero. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Make it possible to disable min_extrude_temp for testingKevin O'Connor2016-10-111-1/+1
| | | | | | | | Allow a config file to specify 'min_extrude_temp: 0' to disable the minimum extrude temperature test. This makes it easier to perform testing on the avr simulator. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Support a minimum extrude temperatureKevin O'Connor2016-09-301-0/+8
| | | | | | | | Allow the config file to specify the minimum temperature for the extruder and check for that temperature prior to moving the extruder motor. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Add "ATC Semitec 104GT-2" thermistor definitionKevin O'Connor2016-09-151-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Remove redundant float conversionKevin O'Connor2016-09-151-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Convert PWM and ADC objects to take mcu_time instead of clockKevin O'Connor2016-08-241-58/+46
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+288
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>