mirror of
https://github.com/sudoxnym/open-hyperion.git
synced 2026-07-22 03:24:09 +00:00
Add option to enable or disable multicast receiving
This commit is contained in:
parent
00bc8684c2
commit
d7d57834a1
2 changed files with 25 additions and 7 deletions
|
|
@ -187,14 +187,19 @@ void OpenRGBE131ReceiverDialog::E131ReceiverThreadFunction()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------*\
|
/*-----------------------------------------------------*\
|
||||||
| Join the configured universes |
|
| Join the configured universes if multicast enabled |
|
||||||
\*-----------------------------------------------------*/
|
\*-----------------------------------------------------*/
|
||||||
|
bool multicast = ui->EnableMulticastBox->checkState() == Qt::Checked;
|
||||||
|
|
||||||
for(unsigned int universe_idx = 0; universe_idx < universe_list.size(); universe_idx++)
|
for(unsigned int universe_idx = 0; universe_idx < universe_list.size(); universe_idx++)
|
||||||
{
|
{
|
||||||
if(e131_multicast_join(sockfd, universe_list[universe_idx].universe) < 0)
|
if(multicast)
|
||||||
{
|
{
|
||||||
printf("Join error\r\n");
|
if(e131_multicast_join(sockfd, universe_list[universe_idx].universe) < 0)
|
||||||
return;
|
{
|
||||||
|
printf("Join error\r\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="ReceiverSourceValue">
|
||||||
|
<property name="text">
|
||||||
|
<string>Source</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="ReceiverStatusValue">
|
<widget class="QLabel" name="ReceiverStatusValue">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -78,10 +85,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="3" column="3">
|
||||||
<widget class="QLabel" name="ReceiverSourceValue">
|
<widget class="QCheckBox" name="EnableMulticastBox">
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Source</string>
|
<string>Enable Multicast</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue