aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/output_pin.py
Commit message (Collapse)AuthorAgeFilesLines
* Isort all klippy codeTomasz Kramkowski2025-08-151-2/+3
|
* Run black on all first party python codeTomasz Kramkowski2025-08-061-39/+62
|
* output_pin: Use mcu.min_schedule_time() and mcu.max_nominal_duration()Kevin O'Connor2025-04-281-9/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Make it possible to assign dicts/lists as template parametersKevin O'Connor2025-04-031-3/+10
| | | | | | | | | The output_pin template code has a cache to speed up duplicate rendering of templates. However, this cache doesn't work if one of the parameters is a Python list or dictionary. Just disable the cache in this case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Fix handling of template rendering errorsKevin O'Connor2025-03-251-0/+1
| | | | | | | Make sure to assign 'value' on a rendering error to avoid an internal error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Support setting a TEMPLATE on SET_PIN commandsKevin O'Connor2024-09-301-2/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Move template evaluation code from led.py to output_pin.pyKevin O'Connor2024-09-301-1/+110
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Add send_async_request() support to GCodeRequestQueueKevin O'Connor2024-09-161-2/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Improve GCodeRequestQueue timing on duplicate requestsKevin O'Connor2024-09-161-13/+19
| | | | | | | | 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>
* output_pin: Keep flushing GCodeRequestQueue if neededKevin O'Connor2024-09-131-18/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Introduce new helper to facilitate queuing of gcode requestsKevin O'Connor2024-09-121-14/+52
| | | | | | | Add a new GCodeRequestQueue class that can queue and collate g-code pin requests. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Remove deprecated maximum_mcu_duration and static_valueKevin O'Connor2024-09-121-42/+7
| | | | | | | Remove support for these two config options that were previously deprecated. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwm_cycle_time: New module for output pins with dynamic cycle timesKevin O'Connor2024-01-231-15/+10
| | | | | | | | | Remove support for changing the cycle time of pwm pins from the output_pin module. Use a new pwm_cycle_time module that supports setting dynamic cycle times. This simplifies the output_pin code and low-level pin update code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Deprecate the maximum_mcu_duration parameterKevin O'Connor2024-01-231-0/+1
| | | | | | | Advise users to configure a pwm_tool config section if checking for maximum mcu duration is required. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Deprecate static_value parameterKevin O'Connor2024-01-231-19/+20
| | | | | | | | | | | | Remove support for configuring "static" pins in output_pin module. A "static" pin only saves a few bytes of memory in the micro-controller. The savings does not justify the increased code complexity. Deprecate the static_value parameter to warn users. In the interim, a static_value parameter will set both value and shutdown_value parameters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: fix time difference calculationPascal Pieper2021-08-171-1/+1
| | | | Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
* output_pin: Fix bug in setting of self.resend_intervalKevin O'Connor2021-03-271-1/+2
| | | | | | | Only set resend_interval if a mcu_duration is specified. This fixes a bug introduced in commit 861144d8. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Make sure to not use a cycle_time or max_duration over 5 secondsKevin O'Connor2021-03-261-5/+8
| | | | | | | Times longer than 5 seconds may result in a 32bit ticks overflow in the micro-controller (for fast micro-controllers). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Increase time host has to confirm a pin settingKevin O'Connor2021-03-261-6/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Support setting max_duration (#3995)Pascal P2021-03-261-5/+33
| | | | | Also added documentation for using powered tools. Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
* output_pin: Don't flush lookahead queue on a SET_PIN commandKevin O'Connor2020-11-131-15/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add support for changing cycle_time in set_pwm()Kevin O'Connor2020-09-261-6/+12
| | | | | Signed-off-by: Guy Shapira <gayuha@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-8/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: add get_status methodJanar Sööt2019-06-041-0/+2
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* output_pin: Fix SET_PIN max_val checkKevin O'Connor2018-06-051-1/+2
| | | | | | The maxval should be self.scale. Reported by @mvturnho. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Use new gcode.register_mux_command()Kevin O'Connor2018-05-201-13/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Add minval/maxval/above/below options to get_X parsersKevin O'Connor2018-04-201-3/+2
| | | | | | Add value checking to gcode parameter parsing code. 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>