pwm_tool: Add support for high-speed PWM pin updates
The output_pin module is only capable of updating an output pin at most once every 100ms. Add a new pwm_tool module that is capable of queuing updates in the micro-controller and thus allowing for much higher update rates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
# such as a laser or spindle.
|
||||
# See docs/Using_PWM_Tools.md for a more detailed description.
|
||||
|
||||
[output_pin TOOL]
|
||||
[pwm_tool TOOL]
|
||||
pin: !ar9 # use your fan's pin number
|
||||
pwm: True
|
||||
hardware_pwm: True
|
||||
cycle_time: 0.001
|
||||
shutdown_value: 0
|
||||
@@ -36,9 +35,9 @@ gcode:
|
||||
|
||||
[menu __main __control __toolonoff]
|
||||
type: input
|
||||
enable: {'output_pin TOOL' in printer}
|
||||
enable: {'pwm_tool TOOL' in printer}
|
||||
name: Fan: {'ON ' if menu.input else 'OFF'}
|
||||
input: {printer['output_pin TOOL'].value}
|
||||
input: {printer['pwm_tool TOOL'].value}
|
||||
input_min: 0
|
||||
input_max: 1
|
||||
input_step: 1
|
||||
@@ -47,9 +46,9 @@ gcode:
|
||||
|
||||
[menu __main __control __toolspeed]
|
||||
type: input
|
||||
enable: {'output_pin TOOL' in printer}
|
||||
enable: {'pwm_tool TOOL' in printer}
|
||||
name: Tool speed: {'%3d' % (menu.input*100)}%
|
||||
input: {printer['output_pin TOOL'].value}
|
||||
input: {printer['pwm_tool TOOL'].value}
|
||||
input_min: 0
|
||||
input_max: 1
|
||||
input_step: 0.01
|
||||
|
||||
Reference in New Issue
Block a user