Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Segment FX #4124

Open
wants to merge 11 commits into
base: 0_15
Choose a base branch
from
Open

Copy Segment FX #4124

wants to merge 11 commits into from

Commits on Sep 1, 2024

  1. Added FX to copy a segment in 1D or 2D

    - copies the source segment
    - brightness of segment is relative to source segment
    - optionally shifts the color hue
    - invert, transpose, mirror work
    - if source or targets do not match in size, smallest size is copied
    - unused pixels fade to black (allows overlapping segments)
    - if invalid source ID is set, segment just fades to black
    - added a rgb2hsv conversion function as the fastled variant is inaccurate and buggy
    
    note: 1D to 2D and vice versa is not supported
    DedeHai committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    434ba3f View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Added copying source settings

    target segment now also copies the source settings (mirror, grouping, spacing, transpose) so the target looks exactly like the source. inverting can still be set independently.
    note: the bug in line 214 of FX_2Dfcn.cpp missing `start` needs to be fixed for it to work properly in 2D.
    DedeHai committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    24df6bf View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Update integrating new ideas as discussed

    - added color adjust function with support for hue, lightness and brightness
    - colors can now be adjusted in hue, saturation and brightness
    - added  `getRenderedPixelXY()` function (credit @willmmiles)
    - source is now accurately copied, even 1D->2D is possible
    - fix for segment offset not being zero in 2D in `getRenderedPixelXY()`
    - added checkmark to copy source grouping/spacing (may remove again)
    - tested many different scenarios, everything seems to work
    DedeHai committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    696f74b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e0ceab View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. fixes and optimizations

    - removed 'copy grouping/spacing' option
    - added 'Switch axis' instead (in 2D -> 1D copy this chooses x or y axis to be copied)
    - optimized for code size and speed by not using CRGB (where possible) and not returning struct in `rgb2hsv()`
    DedeHai committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    8aa82ab View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    dd8353a View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2024

  1. Configuration menu
    Copy the full SHA
    bdd8747 View commit details
    Browse the repository at this point in the history
  2. rgb2hsv now returns the CHSV value instead of using a reference

    added alias function to accept CRGB value.
    this is more versatile for future uses.
    also removed some whitespaces
    DedeHai committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    df33a36 View commit details
    Browse the repository at this point in the history
  3. added forgotten returnvalue

    DedeHai committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    7db1adc View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Configuration menu
    Copy the full SHA
    24a424a View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Added HSV2RGB and RGB2HSV functions for higher accuracy conversions

    - Bonus: saves over 1.2kB of flash
    -also added a struct to handle HSV with 16bit hue better (including some conversions, can be extended easily)
    - the functions are optimized for speed and flash use. They are faster and more accurate than what fastled offers (and use much less flash).
    - replaced colorHStoRGB() with a call to the new hsv2rgb() function, saving even more flash
    - the 16bit hue calculations result in an almost perfect conversion from RGB to HSV and back, the maximum error was 1/255 in the cases I tested.
    DedeHai committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    a5807b5 View commit details
    Browse the repository at this point in the history