Python 3.4 (#479)

* Python 3

* fix travis osx

* try fix

* get info

* digging in the dirt

* .

* .

* cleanup

* .

* .

* finalize, add multi threaded python support
This commit is contained in:
brindosch
2017-10-13 17:49:29 +02:00
committed by GitHub
parent 77dadc6ff9
commit 4c2b75b45a
12 changed files with 86 additions and 69 deletions

View File

@@ -24,9 +24,10 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const QJsonObject & jsonEffectCo
, _effectConfig(jsonEffectConfig)
, _availableEffects()
, _activeEffects()
, _mainThreadState(nullptr)
, _log(Logger::getInstance("EFFECTENGINE"))
, _mainThreadState(nullptr)
{
Q_INIT_RESOURCE(EffectEngine);
qRegisterMetaType<std::vector<ColorRgb>>("std::vector<ColorRgb>");
qRegisterMetaType<hyperion::Components>("hyperion::Components");
@@ -280,7 +281,7 @@ int EffectEngine::runEffectScript(const QString &script, const QString &name, co
channelCleared(priority);
// create the effect
Effect * effect = new Effect(priority, timeout, script, name, args, origin, smoothCfg);
Effect * effect = new Effect(_mainThreadState, priority, timeout, script, name, args, origin, smoothCfg);
connect(effect, SIGNAL(setColors(int,std::vector<ColorRgb>,int,bool,hyperion::Components,const QString,unsigned)), _hyperion, SLOT(setColors(int,std::vector<ColorRgb>,int,bool,hyperion::Components,const QString,unsigned)), Qt::QueuedConnection);
connect(effect, &QThread::finished, this, &EffectEngine::effectFinished);
_activeEffects.push_back(effect);