- Fixed a bug in order of initialization and registering universes in
ola
This commit is contained in:
parent
1b7664edaf
commit
eecc123e98
7 changed files with 25 additions and 22 deletions
|
|
@ -61,10 +61,10 @@ private:
|
|||
*/
|
||||
inline void RegisterComplete(const ola::client::Result &error) {
|
||||
if (error.Success()) {
|
||||
// qDebug("Register Universe success");
|
||||
qDebug("Register Universe success");
|
||||
emit toTerminal("Register Universe success");
|
||||
} else {
|
||||
// qWarning("Register command failed: %s", error.Error().c_str());
|
||||
qWarning("Register command failed: %s", error.Error().c_str());
|
||||
emit toTerminal("olaThread| Register command failed " + QString::fromStdString(error.Error()));
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +109,11 @@ public slots:
|
|||
* @param universe
|
||||
*/
|
||||
inline void registerUniverse(int universe) {
|
||||
m_client->RegisterUniverse(universe, ola::client::REGISTER,ola::NewSingleCallback(this, &olaThread::RegisterComplete));
|
||||
qDebug("Registering universe %d", universe);
|
||||
m_client->RegisterUniverse(universe,
|
||||
ola::client::REGISTER,
|
||||
ola::NewSingleCallback
|
||||
(this, &olaThread::RegisterComplete));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -117,7 +121,8 @@ public slots:
|
|||
*
|
||||
*/
|
||||
inline void registerUniverse() {
|
||||
for (int universe = 0; universe < Settings::getInstance()->getUniverseNumber(); universe++) {
|
||||
QSet<int> unis = Settings::getInstance()->getUniverses();
|
||||
foreach (const int &universe, unis) {
|
||||
registerUniverse(universe);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue