Added the option to specify the color byte order

Former-commit-id: f911d0f26c25345bbe5e9014fbc31568b7386f08
This commit is contained in:
johan
2013-11-04 20:52:57 +01:00
parent 8d8c4bdfad
commit fc1e4bc6c8
9 changed files with 98 additions and 12 deletions

View File

@@ -46,6 +46,12 @@ public:
SATURATION_GAIN, VALUE_GAIN, THRESHOLD, GAMMA, BLACKLEVEL, WHITELEVEL
};
/// Enumeration containing the possible orders of device color byte data
enum ColorOrder
{
ORDER_RGB, ORDER_RBG, ORDER_GRB, ORDER_BRG, ORDER_GBR, ORDER_BGR
};
///
/// Constructs the Hyperion instance based on the given Json configuration
///
@@ -136,6 +142,7 @@ public:
const InputInfo& getPriorityInfo(const int priority) const;
static LedDevice * createDevice(const Json::Value & deviceConfig);
static ColorOrder createColorOrder(const Json::Value & deviceConfig);
static LedString createLedString(const Json::Value & ledsConfig);
static HsvTransform * createHsvTransform(const Json::Value & hsvConfig);
static ColorTransform * createColorTransform(const Json::Value & colorConfig);
@@ -172,8 +179,8 @@ private:
/// The BLUE-Channel (RGB) transform
ColorTransform * _blueTransform;
/// Flag indicating if the output should be BGR (red and blue reversed)
bool _haveBgrOutput;
/// Value with the desired color byte order
ColorOrder _colorOrder;
/// The actual LedDevice
LedDevice * _device;