Hi
I know this is old, but may I ask if it's possible to add GRBW to the RGB Panel options?
I've been able to add GRBW LED lamps as a single fixture, but that makes adding them to groups a little time consuming.
As I'm not a developer or even pretend to know the first this about coding, I am aware that I may just be adding to someone else's work load.
That said, I have taken a look at the files shown above and can see that is looks like they "just" need the different permutations of pixel orders adding.
If it helps, I think this is a fair list :-
6 Red Green Blue permutations
12 x Red, Green, Blue & White permutations
- RGBW
RBGW
GRBW
GBRW
BRGW
BGRW
WRGB
WRBG
WGRB
WGBR
WBRG
WBGR
I'm happy to download the source code and try to add the data, but compiling the resulting code is way beyond my skills base.
Okay...
I've tried...
Does this look about right?
https://github.com/mcallegari/qlcplus/b ... l.cpp#L165
Code: Select all
Fixture::Components AddRGBPanel::components()
{
if (m_compCombo->currentIndex() == 1)
return Fixture::BGR;
else if (m_compCombo->currentIndex() == 2)
return Fixture::BRG;
else if (m_compCombo->currentIndex() == 3)
return Fixture::GBR;
else if (m_compCombo->currentIndex() == 4)
return Fixture::GRB;
else if (m_compCombo->currentIndex() == 5)
return Fixture::RBG;
else if (m_compCombo->currentIndex() == 6)
return Fixture::RGBW;
else if (m_compCombo->currentIndex() == 7)
return Fixture::GRBW;
else if (m_compCombo->currentIndex() == 8)
return Fixture::GBRW;
else if (m_compCombo->currentIndex() == 9)
return Fixture::BRGW;
else if (m_compCombo->currentIndex() == 10)
return Fixture::BGRW;
else if (m_compCombo->currentIndex() == 11)
return Fixture::WRGB;
else if (m_compCombo->currentIndex() == 12)
return Fixture::WRBG;
else if (m_compCombo->currentIndex() == 13)
return Fixture::WGRB;
else if (m_compCombo->currentIndex() == 14)
return Fixture::WGBR;
else if (m_compCombo->currentIndex() == 15)
return Fixture::WBRG;
else if (m_compCombo->currentIndex() == 16)
return Fixture::WBGR;
return Fixture::RGB;
}
https://github.com/mcallegari/qlcplus/b ... el.cpp#L43
Code: Select all
AddRGBPanel::AddRGBPanel(QWidget *parent, const Doc *doc)
: QDialog(parent)
, m_doc(doc)
{
setupUi(this);
/* Fill universe combo with available universes */
m_uniCombo->addItems(m_doc->inputOutputMap()->universeNames());
m_compCombo->addItem("RGB");
m_compCombo->addItem("BGR");
m_compCombo->addItem("BRG");
m_compCombo->addItem("GBR");
m_compCombo->addItem("GRB");
m_compCombo->addItem("RBG");
m_compCombo->addItem("RBGW");
m_compCombo->addItem("GRBW");
m_compCombo->addItem("GBRW");
m_compCombo->addItem("BRGW");
m_compCombo->addItem("BGRW");
m_compCombo->addItem("WRGB");
m_compCombo->addItem("WRBG");
m_compCombo->addItem("WGRB");
m_compCombo->addItem("WGBR");
m_compCombo->addItem("WBRG");
m_compCombo->addItem("WBGR");
checkAddressAvailability();
connect(m_uniCombo, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotUniverseChanged()));
connect(m_addressSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotAddressChanged()));
connect(m_columnSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotSizeChanged(int)));
connect(m_rowSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotSizeChanged(int)));
}
https://github.com/mcallegari/qlcplus/b ... ure.h#L425
Code: Select all
/*********************************************************************
* Generic RGB panel
*********************************************************************/
public:
enum Components {
RGB = 0,
BGR,
BRG,
GBR,
GRB,
RBG,
RGBW,
RBGW,
GRBW,
GBRW,
BRGW,
BGRW,
WRGB,
WRBG,
WGRB,
WGBR,
WBRG,
WBGR
};
from
https://github.com/mcallegari/qlcplus/b ... ixture.cpp
Code: Select all
/*********************************************************************
* Generic RGB panel
*********************************************************************/
QLCFixtureDef *Fixture::genericRGBPanelDef(int columns, Components components)
{
QLCFixtureDef *def = new QLCFixtureDef();
def->setManufacturer(KXMLFixtureGeneric);
def->setModel(KXMLFixtureRGBPanel);
def->setType(QLCFixtureDef::LEDBarPixels);
def->setAuthor("QLC+");
for (int i = 0; i < columns; i++)
{
QLCChannel* red = new QLCChannel();
red->setName(QString("Red %1").arg(i + 1));
red->setGroup(QLCChannel::Intensity);
red->setColour(QLCChannel::Red);
QLCChannel* green = new QLCChannel();
green->setName(QString("Green %1").arg(i + 1));
green->setGroup(QLCChannel::Intensity);
green->setColour(QLCChannel::Green);
QLCChannel* blue = new QLCChannel();
blue->setName(QString("Blue %1").arg(i + 1));
blue->setGroup(QLCChannel::Intensity);
blue->setColour(QLCChannel::Blue);
if (components == BGR)
{
def->addChannel(blue);
def->addChannel(green);
def->addChannel(red);
}
else if (components == BRG)
{
def->addChannel(blue);
def->addChannel(red);
def->addChannel(green);
}
else if (components == GBR)
{
def->addChannel(green);
def->addChannel(blue);
def->addChannel(red);
}
else if (components == GRB)
{
def->addChannel(green);
def->addChannel(red);
def->addChannel(blue);
}
else if (components == RBG)
{
def->addChannel(red);
def->addChannel(blue);
def->addChannel(green);
}
else if (components == RGBW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(red);
def->addChannel(green);
def->addChannel(blue);
def->addChannel(white);
}
else if (components == RBGW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(red);
def->addChannel(blue);
def->addChannel(green);
def->addChannel(white);
}
else if (components == GRBW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(green);
def->addChannel(red);
def->addChannel(blue);
def->addChannel(white);
}
else if (components == GBRW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(green);
def->addChannel(blue);
def->addChannel(red);
def->addChannel(white);
}
else if (components == BRGW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(blue);
def->addChannel(red);
def->addChannel(green);
def->addChannel(white);
}
else if (components == BGRW)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(blue);
def->addChannel(green);
def->addChannel(red);
def->addChannel(white);
}
else if (components == WRGB)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(red);
def->addChannel(green);
def->addChannel(blue);
}
else if (components == WRBG)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(red);
def->addChannel(blue);
def->addChannel(green);
}
else if (components == WGRB)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(green);
def->addChannel(red);
def->addChannel(blue);
}
else if (components == WGBR)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(green);
def->addChannel(blue);
def->addChannel(red);
}
else if (components == WBRG)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(blue);
def->addChannel(red);
def->addChannel(green);
}
else if (components == WBGR)
{
QLCChannel* white = new QLCChannel();
white->setName(QString("White %1").arg(i + 1));
white->setGroup(QLCChannel::Intensity);
white->setColour(QLCChannel::White);
def->addChannel(white);
def->addChannel(blue);
def->addChannel(green);
def->addChannel(red);
}
else
{
def->addChannel(red);
def->addChannel(green);
def->addChannel(blue);
}
}
return def;
}
QLCFixtureMode *Fixture::genericRGBPanelMode(QLCFixtureDef *def, Components components, quint32 width, quint32 height)
{
Q_ASSERT(def != NULL);
QLCFixtureMode *mode = new QLCFixtureMode(def);
int compNum = 3;
if (components == BGR)
mode->setName("BGR");
else if (components == BRG)
mode->setName("BRG");
else if (components == GBR)
mode->setName("GBR");
else if (components == GRB)
mode->setName("GRB");
else if (components == RBG)
mode->setName("RBG");
else if (components == RGBW)
{
mode->setName("RGBW");
compNum = 4;
}
else if (components == RBGW)
{
mode->setName("RBGW");
compNum = 4;
}
else if (components == GRBW)
{
mode->setName("GRBW");
compNum = 4;
}
else if (components == GBRW)
{
mode->setName("GBRW");
compNum = 4;
}
else if (components == BRGW)
{
mode->setName("BRGW");
compNum = 4;
}
else if (components == BGRW)
{
mode->setName("BGRW");
compNum = 4;
}
else if (components == WRGB)
{
mode->setName("WRGB");
compNum = 4;
}
else if (components == WRBG)
{
mode->setName("WRBG");
compNum = 4;
}
else if (components == WGRB)
{
mode->setName("WGRB");
compNum = 4;
}
else if (components == WGBR)
{
mode->setName("WGBR");
compNum = 4;
}
else if (components == WBRG)
{
mode->setName("WBRG");
compNum = 4;
}
else if (components == WBGR)
{
mode->setName("WBGR");
compNum = 4;
}
else
mode->setName("RGB");
QList<QLCChannel *>channels = def->channels();
for (int i = 0; i < channels.count(); i++)
{
QLCChannel *ch = channels.at(i);
mode->insertChannel(ch, i);
if (i%compNum == 0)
{
QLCFixtureHead head;
head.addChannel(i);
head.addChannel(i+1);
head.addChannel(i+2);
if (components == RGBW)
head.addChannel(i+3);
if (components == RBGW)
head.addChannel(i+3);
if (components == GRBW)
head.addChannel(i+3);
if (components == GBRW)
head.addChannel(i+3);
if (components == GBRW)
head.addChannel(i+3);
if (components == BRGW)
head.addChannel(i+3);
if (components == BGRW)
head.addChannel(i+3);
if (components == WRGB)
head.addChannel(i+3);
if (components == WRBG)
head.addChannel(i+3);
if (components == WGRB)
head.addChannel(i+3);
if (components == WGBR)
head.addChannel(i+3);
if (components == WGBR)
head.addChannel(i+3);
if (components == WBRG)
head.addChannel(i+3);
if (components == WBGR)
head.addChannel(i+3);
mode->insertHead(-1, head);
}
}
QLCPhysical physical;
physical.setWidth(width);
physical.setHeight(height);
physical.setDepth(height);
mode->setPhysical(physical);
def->addMode(mode);
return mode;
}
I can't find any other reference to RGB or RGBW, but as I say, my coding skills are Zero.
Also, it looks like the White part is ignored by colour pickers.
Meaning, White is created by all 3 RGB, rather than just the White chip.