Change note_mcu_movequeue_activity() to default to setting the
step_gen_time (instead of the previous default to not set it).
Most users of the mcu "move queue" will be for stepper activity.
There is also little harm in incrementing the tracking of the last
possible step generation time, but accidentally generating a step
without incrementing the tracking can lead to very hard to debug
failures.
The two cases (output_pin.py and pwm_tool.py) where
note_mcu_movequeue_activity() is called and definitely not related to
step generation can explicitly pass 'is_step_gen=False'.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
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>
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>
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>
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>
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>
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>
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>