mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
36b4d072c5
* common ledbuffer for color transform hyperion class uses a common buffer for all operations on ledColors got from muxer all color transforms uses new ledBuffer instead of making copies of ledbuffer other fixes: fix compile bug in profiler update doxygen config * migrate logging for color transform classes * prepare new logger in hyperion class * implement hwledcount * Update Hyperion.cpp Fix off color * remove ledscount equivalent from apa102 migrate logging in hyperion.cpp remove unused and duuplicate colorcorrection - but same is available through tempertature * remove colorcorrection completly fix compile * set colororder back to static * in remote: using correction is the same as using temperature - correction is obsolete, command not delete atm for compat reasons
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
#pragma once
|
|
|
|
// STL includes
|
|
#include <vector>
|
|
|
|
// Utils includes
|
|
#include <utils/ColorRgb.h>
|
|
|
|
// Hyperion includes
|
|
#include <hyperion/ColorCorrection.h>
|
|
|
|
///
|
|
/// The LedColorCorrection is responsible for performing color correction from 'raw' colors
|
|
/// received as input to colors mapped to match the color-properties of the leds.
|
|
///
|
|
class MultiColorCorrection
|
|
{
|
|
public:
|
|
MultiColorCorrection(const unsigned ledCnt);
|
|
~MultiColorCorrection();
|
|
|
|
/**
|
|
* Adds a new ColorCorrection to this MultiColorCorrection
|
|
*
|
|
* @param Correction The new ColorCorrection (ownership is transfered)
|
|
*/
|
|
void addCorrection(ColorCorrection * correction);
|
|
|
|
void setCorrectionForLed(const std::string& id, const unsigned startLed, const unsigned endLed);
|
|
|
|
bool verifyCorrections() const;
|
|
|
|
///
|
|
/// Returns the identifier of all the unique ColorCorrection
|
|
///
|
|
/// @return The list with unique id's of the ColorCorrections
|
|
const std::vector<std::string> & getCorrectionIds();
|
|
|
|
///
|
|
/// Returns the pointer to the ColorCorrection with the given id
|
|
///
|
|
/// @param id The identifier of the ColorCorrection
|
|
///
|
|
/// @return The ColorCorrection with the given id (or nullptr if it does not exist)
|
|
///
|
|
ColorCorrection* getCorrection(const std::string& id);
|
|
|
|
///
|
|
/// Performs the color transoformation from raw-color to led-color
|
|
///
|
|
/// @param ledColors The list with led colors
|
|
///
|
|
void applyCorrection(std::vector<ColorRgb>& ledColors);
|
|
|
|
private:
|
|
/// List with Correction ids
|
|
std::vector<std::string> _correctionIds;
|
|
|
|
/// List with unique ColorCorrections
|
|
std::vector<ColorCorrection*> _correction;
|
|
|
|
/// List with a pointer to the ColorCorrection for each individual led
|
|
std::vector<ColorCorrection*> _ledCorrections;
|
|
};
|