Merger mode for DE/FX5/Nodle DMX devices

Post Reply
qfulmina
Posts: 14
Joined: Thu May 09, 2024 10:17 pm
Real Name:

Hello everybody,

I'd like to contribute to this wonderful project by implementing support for a most overlooked yet powerful feature of the DE/FX5/Nodle DMX devices: The integrated merger mode.

All those devices have an input and an output port and offer a mode that transforms the device into being an HTP merger that takes the DMX inbound values and (depending on whether the device is set to input, output, both, or none):

a) merges those input values with the output values coming from QLC+ (in HTP mode), or
b) sends input values to QLC+ while sending the same values to the output, or
c) sends input values to QLC+ AND merges those input values with the output values coming from QLC+ (in HTP mode).

A complete mode list of the devices is:
Modes
Modes
forum-modes.png (4.54 KiB) Viewed 1408 times
0: Do nothing - Standby
1: DMX In -> DMX Out
2: PC Out -> DMX Out
3: DMX In + PC Out -> DMX Out
4: DMX In -> PC In
5: DMX In -> DMX Out & DMX In -> PC In
6: PC Out -> DMX Out & DMX In -> PC In
7: DMX In + PC Out -> DMX Out & DMX In -> PC In

But until now modes 1, 3, 5, and 7 are not yet implemented.

Internally, this implementation is easy, because it just adds another 1 to the device driver mode.

Like so in plugins/hid/hiddmxdevice.cpp (last two lines):

Code: Select all

void HIDDMXDevice::updateMode()
{
    /**
    *  Send chosen mode to the HID DMX device
    */
    unsigned char driver_mode = 0;
    if (m_mode & DMX_MODE_OUTPUT)
        driver_mode += 2;
    if (m_mode & DMX_MODE_INPUT)
        driver_mode += 4;
    if (m_mode & DMX_MODE_MERGER)
        driver_mode += 1;
GUI-wise it's a bit more complicated. I'd propose to set this as a setting in the HID device config list:
GUI
GUI
forum2.png (10.05 KiB) Viewed 1408 times
But as those devices are HID devices suddenly all HID devices (Joysticks and the like) get this checkbox too which only makes sense for the beforementioned devices.

Has somebody any proposal on this one?

Should the mentioned devices be separated from HIDDevices or should all the other HIDDevices just disable this checkbox or is there a more clever approach for setting this setting?

Thanks and regards.
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Hi, at the moment there is no flag to distinguish between a DMX device or something else
However it's pretty easy to add it upon detection here:
https://github.com/mcallegari/qlcplus/b ... n.cpp#L278
qfulmina
Posts: 14
Joined: Thu May 09, 2024 10:17 pm
Real Name:

Thank you for your fast reply.

So UI-wise you would say it's okay to add a column to the list at the HID configuration dialog that is only used by HID DMX devices (for this checkbox) and left unused by all other HID devices?
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Yeah, it makes sense to add a checkbox in the config dialog.
Post Reply