aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/servo.py
Commit message (Collapse)AuthorAgeFilesLines
* Run black on all first party python codeTomasz Kramkowski2025-08-061-26/+44
|
* output_pin: Improve GCodeRequestQueue timing on duplicate requestsKevin O'Connor2024-09-161-4/+4
| | | | | | | | If there is a duplicate request it is not necessary to add a 100ms delay to the next update. Rework the callback signaling to better report these duplicate updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Use GCodeRequestQueue to queue updatesKevin O'Connor2024-09-121-12/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Asynchronous adjustments of servo positionDmitry Butyugin2024-08-031-3/+5
| | | | | | | | | | | This change follows the same approach as implemented for fan control. The change removes the move queue flushing when changing servo position, which does not appear to be necessary. This can be beneficial, for example, for WS7040-based cooling on IDEX setups where the servo can be used to control the air flow between the toolheads, with this change eliminating micro-stutters of the toolhead on servo position adjustment. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* servo: Set initial value via mcu_servo.setup_start_value()Kevin O'Connor2020-07-251-30/+21
| | | | | | | | Using the setup_start_value() method avoids the PWM output line transitioning to an intermediate state prior to setting the initial value. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Remove servo ENABLE parameterKevin O'Connor2020-07-251-16/+6
| | | | | | | Allow one to disable servos via `SET_SERVO WIDTH=0` instead of using an explicit ENABLE parameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-16/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: add get_status methodJanar Sööt2019-06-041-0/+2
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* klippy: Convert printer_state("ready") to an event handlerKevin O'Connor2019-01-081-6/+6
| | | | | | | Convert all users of the printer_state("ready") handler to register a "klippy:ready" event handler instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: This patch create ability to enable/disable attached servo. (#880)Jiri Dobry2018-11-141-4/+16
| | | | | | | | | | | | | | | | | | | Cheap mechanical servos have small flickering. When this servo stay on one position, this flickering slowly destroy internal potentiometer and make servo unusable. Many mechanisms need servo only to change position. Therefore I create this minor path to enable/disable servo. It stop pulses for this servo, that's all. Corresponding G-code is: SET_SERVO SERVO=config_name [WIDTH=] [ENABLE=<0|1>] SET_SERVO SERVO=config_name [ANGLE=] [ENABLE=<0|1>] For example: SET_SERVO SERVO=touch ANGLE=80 ENABLE=1 ; enable servo and set position G4 P200 ; wait 200ms SET_SERVO SERVO=touch ENABLE=0 ; disable servo This patch add one option to servo configuration: enable: <False/True> # default True It not have impact to user code existing already because it is optional parameter and default value is same as original behavior. Signed-off-by: Jiri Dobry <jdobry@centrum.cz>
* servo: Wrap lines to 80 columnsKevin O'Connor2018-10-101-10/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Adding support for startup value for servos (#676)Chris Whiteford2018-10-051-9/+25
| | | Signed-off-by: Chris Whiteford <github@chrisandtennille.com>
* servo: Use new gcode.register_mux_command()Kevin O'Connor2018-05-201-8/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Remove module level get_printer_pins() and setup_pin() functionsKevin O'Connor2018-04-041-2/+2
| | | | | | | | 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>
* klippy: Introduce load_config_prefix() for modules that take parametersKevin O'Connor2018-02-031-1/+1
| | | | | | | | 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>
* 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>