aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* toolhead: Move kinematic modules to new kinematics/ directoryKevin O'Connor2018-07-129-17/+37
| | | | | | | | Move extruder.py, cartesian.py, corexy.py, and delta.py to a new kinematics/ sub-directory. This is intended to make adding new kinematics a little easier. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: No need to pass printer reference to add_printer_objects()Kevin O'Connor2018-07-126-18/+20
| | | | | | The config reference already stores a reference to the printer object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Send mcu config and init immediately after building itKevin O'Connor2018-07-121-34/+35
| | | | | | | | | | Don't issue a get_config command after building the config as the built config may contain time sensitive initialization commands. Instead, send the config and init commands immediately after invoking the build_config() callbacks. This avoids some rare "timer too close" errors during configuration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add leading underscore to handle_shutdown() and handle_mcu_stats()Kevin O'Connor2018-07-121-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Minor comment updatesKevin O'Connor2018-07-091-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Use CLOCK_MONOTONIC_RAWKevin O'Connor2018-07-091-1/+1
| | | | | | | | | | | | Switch the host code from the CLOCK_MONOTONIC clock to the Linux specific CLOCK_MONOTONIC_RAW clock. It's common for ntp to slew the CLOCK_MONOTONIC clock to account for drift, and that can break the host's ability to make accurate predictions of the micro-controller clock. This could lead to "move queue empty" errors. The CLOCK_MONOTONIC_RAW clock is not slewed and thus should not have this problem. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Add display g-code commands to docs/G-Codes.mdKevin O'Connor2018-07-081-2/+1
| | | | | | | | | | Add M117 and M73 to the list of supported G-Codes. Also, remove M117 from the list of commands reported by the HELP command as that command is typically only used to list "extended g-code" commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Introduce smooth_time config option; remove pid_deriv_timeKevin O'Connor2018-07-062-21/+32
| | | | | | | | | | | Add generic temperature smoothing to the Heater class. This is useful to avoid min_extrude_temp and verify_heater errors due to measurement noise. Rename the pid_deriv_time config option to smooth_time so that the smoothing amount need only be specified once. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: fix for GET_POSITION (#454)Eric Callahan2018-07-031-1/+4
| | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* adccmds: Add support for min/max temperature check filteringKevin O'Connor2018-07-023-6/+13
| | | | | | | | | | | Extend the ADC out of range check so that it is possible to sample multiple times before going into a shutdown state. This reduces the chance that measurement noise will cause an error. In an actual over temperature (or under temperature event) it is expected that the sensor will consistently report the problem, so extra checks for an additional second or two should not substantially increase risk. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Improve rotary encoder handler by using Ben Buxton state machine. ↵Janar Sööt2018-07-011-11/+35
| | | | | | | (#445) https://github.com/brianlow/Rotary Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* tmc2130: Add a DUMP_TMC helper commandKevin O'Connor2018-06-301-3/+33
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Add initial support for detecting button pressesKevin O'Connor2018-06-302-2/+146
| | | | | | | Add mcu support for periodically polling for a button press. Add host code support for registering buttons and invoking callbacks for them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* reactor: Add ability to register callbacksKevin O'Connor2018-06-301-6/+58
| | | | | | | Add the ability to register callbacks - both asynchronous (ie, from another thread) and synchronous. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Add run_script() method that is valid from non-command contextsKevin O'Connor2018-06-301-0/+11
| | | | | | | Add an ability to run a series of g-code commands from a reactor callback that isn't part of the normal g-code command processing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename run_script() to run_script_from_command()Kevin O'Connor2018-06-306-10/+10
| | | | | | | Emphasize that the run_script() method is only valid when run from a g-code command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Strip pin names before trying to parse themKevin O'Connor2018-06-301-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcp4451: Add initial support for programming the mcp4451 on lpc176xKevin O'Connor2018-06-291-0/+32
| | | | | | Add support for programming smoothieboard current. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: fix for 128 x 64 pixel displaysArksine2018-06-281-5/+3
| | | | | | Right justify fan speed and feed rate, keep progress centered. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* build: Cleanup whitespace errorsKevin O'Connor2018-06-283-8/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: uc1701 spi fixArksine2018-06-281-8/+2
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* display: add UC1701 graphics controller supportArksine2018-06-272-17/+203
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* display: add VGA fontArksine2018-06-271-0/+276
| | | | | | | | | Font from fntcol16.zip package: ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip (c) Joseph Gil Font is public domain Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* pid_calibrate: Update the heater's target temperature during calibrationKevin O'Connor2018-06-272-4/+10
| | | | | | | | Update the target temperature during the pid calibration. This gives additional feedback to the user and it makes it less likely that a verify_heater error will be raised during calibration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Don't peak into Heater class member variablesKevin O'Connor2018-06-272-23/+32
| | | | | | The control classes should not peak into the heater member variables. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move icons to their own moduleKevin O'Connor2018-06-272-152/+147
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move st7920 code to its own moduleKevin O'Connor2018-06-272-128/+129
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move hd44780 code to its own moduleKevin O'Connor2018-06-272-169/+174
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move klippy/extras/display.py to klippy/extras/display/display.pyKevin O'Connor2018-06-272-0/+9
| | | | | | | Move the display code into its own directory. This is in preparation for splitting it up into its own modules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Allow extras modules to be directoriesKevin O'Connor2018-06-271-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: add M117 "show message" supportArksine2018-06-271-2/+42
| | | | | | | | | | When M117 is followed by an empty string, the display will reset to Klipper's default. Internal modules may look up the display and directly call set_message(), with a timeout if desired. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* display: M73 UpdatesArksine2018-06-271-17/+50
| | | | | | | | | - Add M73 support for HD44780 - Include HD44780 USB and SD glyphs to differentiate progress type - Fix bug that prevented M73 from updated when virtual_sd is enabled - Add 5 second timeout to reset display when not Printing Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* toolhead: Disable all extruder motors on a motor_off()Kevin O'Connor2018-06-231-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Use a longer delay at the start of each command/dataKevin O'Connor2018-06-221-4/+6
| | | | | | | | | | | It appears the st7920 requires a longer delay when switching from command to data mode (and vice-versa). Slower MCUs don't show a problem because the klipper command processing time results in a sufficient delay. However, some of the faster MCUs can process klipper commands fast enough that the next st7920 transfer is sent too fast. Add an additional delay to account for this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Don't peak into PrinterRail class from get_calibrate_params()Kevin O'Connor2018-06-221-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Rename get_position() callback to get_probed_position()Kevin O'Connor2018-06-224-4/+4
| | | | | | | The different uses of get_position() can be confusing, so choose a different name for the ProbePointsHelper callback. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mathutil: Move trilateration code from delta.py to mathutil.pyKevin O'Connor2018-06-222-58/+67
| | | | | | | Move the trilateration algorithm to mathutil.py. It may be useful outside of delta kinematics, and it complicates the delta code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Remove the unnecessary StepList constantKevin O'Connor2018-06-221-5/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* corexy: Remove the unnecessary StepList constantKevin O'Connor2018-06-221-5/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* cartesian: Remove the unnecessary StepList constantKevin O'Connor2018-06-221-8/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Support setting the stepper position via a cartesian coordinateKevin O'Connor2018-06-228-19/+28
| | | | | | | | | Add support for an itersolve_set_position() function that sets a stepper position from a cartesian coordinate. This eliminates the need for both the python and C code to be able to translate from a cartesian coordinate to a stepper position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Rename get_position() to calc_position()Kevin O'Connor2018-06-227-8/+8
| | | | | | | | Calculating the cartesian position from the stepper positions can be complex and cpu intensive, so rename it to calc_position() to be more descriptive. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: No need to call kin.get_position() to report positionKevin O'Connor2018-06-221-4/+3
| | | | | | | | After a probe operation, homing_move() will already have recalculated the toolhead position. The get_position() method can be slow, so use the already calculated position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Replace PrinterHomingStepper with PrinterRailKevin O'Connor2018-06-227-194/+200
| | | | | | | | Update the code to use the term "rail" when dealing with a motor controlled "axis". A rail has a series of steppers and endstops that control that motor controlled "axis". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_homing_info() method to PrinterHomingStepperKevin O'Connor2018-06-224-32/+43
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_range() method to PrinterHomingStepperKevin O'Connor2018-06-223-10/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Don't peak into PrinterStepper membersKevin O'Connor2018-06-227-24/+26
| | | | | | | Add additional wrapper functions so that no outside callers need to peak into the member variables of PrinterStepper. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a is_stepper_enabled() method to PrinterStepperKevin O'Connor2018-06-224-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Don't store step_dist in PrinterStepperKevin O'Connor2018-06-222-12/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_name() method to PrinterStepperKevin O'Connor2018-06-223-12/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>