Hi,
is it somehow possible to evaluate the value of the OSC-message?
eg: /1/push1 ,i1 activates the button, /1/push1 ,i0 deactivates it.
If not, is there any workaround?
kind regards!
OSC: Activate/Deactive button
-
- Posts: 18
- Joined: Tue Jul 07, 2015 5:18 pm
- Real Name:
Hi,
I want to send OSC messages from various clients (eg. home automation, android-tablet) to the QLC+. For the tablet I'm ok with toggling', but for home automation I'm not.
I'd like to integrate a chaser and some effects (moonflower) to our home automation server (HS). There is a On/Off switch to turn on the chaser, the HS can send the value 1 or 0 to QLC.
Toggling work fine (by sending 1), but if any UDP packet is lost or if anyone else is turning on/off the button in qlc+ the HS is doing wrong.
thanks for your fast response!!
regards
I want to send OSC messages from various clients (eg. home automation, android-tablet) to the QLC+. For the tablet I'm ok with toggling', but for home automation I'm not.
I'd like to integrate a chaser and some effects (moonflower) to our home automation server (HS). There is a On/Off switch to turn on the chaser, the HS can send the value 1 or 0 to QLC.
Toggling work fine (by sending 1), but if any UDP packet is lost or if anyone else is turning on/off the button in qlc+ the HS is doing wrong.
thanks for your fast response!!
regards
-
- Posts: 637
- Joined: Sun Apr 12, 2015 6:30 pm
- Real Name: David
Solution 1: Replacing your toggle button with a slider in should work.
But I just realized I kinda broke sliders in 4.10.2: using sliders may erase the fadein speed of your rgbmatrices. You may use 4.10.1 if you experience this issue.
Solution 2: If you don't want to use 4.10.1 and if you build QLC+ from sources, you can patch the VCButton so a zero value will un-toggle it.
But I just realized I kinda broke sliders in 4.10.2: using sliders may erase the fadein speed of your rgbmatrices. You may use 4.10.1 if you experience this issue.
Solution 2: If you don't want to use 4.10.1 and if you build QLC+ from sources, you can patch the VCButton so a zero value will un-toggle it.
-
- Posts: 18
- Joined: Tue Jul 07, 2015 5:18 pm
- Real Name:
hmm... I think i found the code,..
trying to recompile,..
trying to recompile,..
Code: Select all
diff --git a/ui/src/virtualconsole/vcbutton.cpp b/ui/src/virtualconsole/vcbutton.cpp
index 853fe9d..9560236 100644
--- a/ui/src/virtualconsole/vcbutton.cpp
+++ b/ui/src/virtualconsole/vcbutton.cpp
@@ -525,21 +525,12 @@ void VCButton::slotInputValueChanged(quint32 universe, quint32 channel, uchar va
if (checkInputSource(universe, (page() << 16) | channel, value, sender()))
{
- if (m_action == Flash)
- {
- // Keep the button depressed only while the external button is kept down.
- // Raise the button when the external button is raised.
- if (isOn() == false && value > 0)
- pressFunction();
- else if (isOn() == true && value == 0)
- releaseFunction();
- }
- else if (value > 0)
- {
- // Only toggle when the external button is pressed.
- // Releasing the button does nothing.
+ // Keep the button depressed only while the external button is kept down.
+ // Raise the button when the external button is raised.
+ if (isOn() == false && value > 0)
pressFunction();
- }
+ else if (isOn() == true && value == 0)
+ releaseFunction();
}
}
-
- Posts: 637
- Joined: Sun Apr 12, 2015 6:30 pm
- Real Name: David
Nope, this won't do it 
Try this:
(releaseFunction() is for buttons in flash mode only)

Try this:
Code: Select all
if ((isOn() && value == 0) || (!isOn() && value > 0))
pressFunction();
(releaseFunction() is for buttons in flash mode only)
-
- Posts: 12
- Joined: Fri Dec 18, 2015 9:43 am
- Real Name: George Pierson
Without changing any of the code, I managed to get this going with using a 'stop all functions' fade out string first, (triggered in a solo frame) then sending the function command that you want shortly after. Though I admit this isn't ideal as dropped packets or packets sent from other sources could change things, but the command sent from the automation panel has essentially turned into an, 'only on' button.