mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2014-09-03 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDLiveWire::loadSettings()' method in 'lib/rdlivewire.cpp' and 'lib/rdlivewire.h'. * Fixed a bug in the 'Configure RDCatch' dialog that caused the 'Switcher Matrix' and 'Switcher Output' dropdowns to fail to be populated for a LiveWire LWRP Audio switcher device in 'rdadmin/edit_decks.cpp' and 'rdadmin/edit_decks.h'.
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qsignalmapper.h>
|
||||
|
||||
#include <rd.h>
|
||||
@@ -42,6 +44,7 @@ RDLiveWire::RDLiveWire(unsigned id,QObject *parent,const char *name)
|
||||
live_base_output=0;
|
||||
live_ptr=0;
|
||||
live_connected=false;
|
||||
live_load_ver_count=0;
|
||||
|
||||
//
|
||||
// Connection Socket
|
||||
@@ -103,6 +106,24 @@ void RDLiveWire::connectToHost(const QString &hostname,Q_UINT16 port,
|
||||
}
|
||||
|
||||
|
||||
bool RDLiveWire::loadSettings(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output)
|
||||
{
|
||||
int passes=50;
|
||||
|
||||
live_load_ver_count=1;
|
||||
connectToHost(hostname,port,passwd,base_output);
|
||||
while(--passes>0) {
|
||||
usleep(100000);
|
||||
qApp->processEvents();
|
||||
if(live_load_ver_count==0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString RDLiveWire::deviceName() const
|
||||
{
|
||||
return live_device_name;
|
||||
@@ -593,6 +614,9 @@ void RDLiveWire::ReadVersion(const QString &cmd)
|
||||
live_connected=true;
|
||||
emit connected(live_id);
|
||||
}
|
||||
if(live_load_ver_count>0) {
|
||||
live_load_ver_count--;
|
||||
}
|
||||
if(live_watchdog_state) {
|
||||
live_watchdog_state=false;
|
||||
emit watchdogStateChanged(live_id,QString().sprintf(
|
||||
|
||||
@@ -49,6 +49,8 @@ class RDLiveWire : public QObject
|
||||
unsigned baseOutput();
|
||||
void connectToHost(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output);
|
||||
bool loadSettings(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output);
|
||||
QString deviceName() const;
|
||||
QString protocolVersion() const;
|
||||
QString systemVersion() const;
|
||||
@@ -128,6 +130,7 @@ class RDLiveWire : public QObject
|
||||
QTimer *live_watchdog_timer;
|
||||
QTimer *live_watchdog_timeout_timer;
|
||||
QTimer *live_holdoff_timer;
|
||||
int live_load_ver_count;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user