Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ledC] Please add Arduino support for gamma curve fade #8790

Copy link
Copy link
Open
@TD-er

Description

@TD-er
Issue body actions

Related area

IDF5.x

Hardware specification

ESP32

Is your feature request related to a problem?

Found hardware gamma fade support for ledC in the ESP-IDF 5.1 code.
See:

Describe the solution you'd like

The new Arduino implementation now finally manages pin to channel mapping in 1 place, so it makes sense to also use this abstraction layer for other ledc functions in the IDF code.

What I would like to see:

  • Function to pre-compute a gamma curve, analogue to ledc_fill_multi_fade_param_list (preferrably using an array of ledc_fade_param_config_t as this doesn't need extra memory allocations when using it)
  • Function to set an array of pre-computed values like the ledc_set_multi_fade function. (this technically allows to also set different intervals per LUT value)
  • Function to set an user defined array of pre-computed values, so someone can define their own LUT.
  • Function to 'inspect' the set fade cycle, like the ledc_read_fade_param function. Maybe a bit like the Arduino function ledcRead
  • Function to de-allocate the computed LUT array and preferrably this can also be called when calling to detach.

Typical use cases for this:

  • Fade LEDs, which need a gamma curve per LED color
  • Ramp up/down a servo
  • Function generator to use the ESP as a lab tool to generate reproducible curves

Some nice ideas:

An array of ledc_fade_param_config_t as being used in the ledc_set_multi_fade function can be manually tweaked.
For example you could change the cycle_num to optimize a curve or extend its run time.
Like pre-program the ramp-up, stable value, ramp-down so you still have high fade step-frequency when values change and not using very long arrays.

If this isn't going to be added, can you please make a function to get the current speed_mode and channel of an attached pin?
This way we can still keep using one central administration of which pin is attached to what timer and channel and also use the currently (in Arduino) unsupported ledc functions.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo
Show more project fields

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.