mirror of
https://github.com/sudoxnym/open-hyperion.git
synced 2026-04-14 19:46:39 +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++)
|
||||
{
|
||||
if(e131_multicast_join(sockfd, universe_list[universe_idx].universe) < 0)
|
||||
if(multicast)
|
||||
{
|
||||
printf("Join error\r\n");
|
||||
return;
|
||||
if(e131_multicast_join(sockfd, universe_list[universe_idx].universe) < 0)
|
||||
{
|
||||
printf("Join error\r\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</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">
|
||||
<widget class="QLabel" name="ReceiverStatusValue">
|
||||
<property name="text">
|
||||
|
|
@ -78,10 +85,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="ReceiverSourceValue">
|
||||
<item row="3" column="3">
|
||||
<widget class="QCheckBox" name="EnableMulticastBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Source</string>
|
||||
<string>Enable Multicast</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue