Idea: Fix for chase to end in previous values instead of it's stop values
Posted: Sat Feb 14, 2015 5:50 pm
This is only some bits of code I've found so far that I think might work. You'd need to track down any thing else that would need to be changed to add the bool chasing(), just like flashing(). Possibly also use || efxRunning() to return previous pan/tilt values. Obviously I don't know enough about this code or C++ to know if this will work, but hopefully it will give an idea of how to do it.
In scene.cpp
Change:
/****************************************************************************
* Flashing, Chasing, or EFX
****************************************************************************/
void Scene::flash(MasterTimer* timer)
{
if (flashing() == true || chasing() == true)
return;
Q_ASSERT(timer != NULL);
Function::flash(timer);
timer->registerDMXSource(this, "Scene");
}
void Scene::unFlash(MasterTimer* timer)
{
if (flashing() == false || chasing == false)
return;
Q_ASSERT(timer != NULL);
Function::unFlash(timer);
}
void Scene::writeDMX(MasterTimer* timer, QList ua)
{
Q_ASSERT(timer != NULL);
if (flashing() == true || chasing == true)
{
// Keep HTP and LTP channels up. Flash is more or less a forceful intervention
// so enforce all values that the user has chosen to flash.
foreach (const SceneValue& sv, m_values.keys())
{
FadeChannel fc;
fc.setFixture(doc(), sv.fxi);
fc.setChannel(sv.channel);
quint32 uni = fc.universe();
if (uni != Universe::invalid())
ua[uni]->write(fc.address(), sv.value);
}
}
else
{
timer->unregisterDMXSource(this);
}
}
/**************************************************************************/
In function.cpp
add:
,m_chasing(false)
In scene.cpp
Change:
/****************************************************************************
* Flashing, Chasing, or EFX
****************************************************************************/
void Scene::flash(MasterTimer* timer)
{
if (flashing() == true || chasing() == true)
return;
Q_ASSERT(timer != NULL);
Function::flash(timer);
timer->registerDMXSource(this, "Scene");
}
void Scene::unFlash(MasterTimer* timer)
{
if (flashing() == false || chasing == false)
return;
Q_ASSERT(timer != NULL);
Function::unFlash(timer);
}
void Scene::writeDMX(MasterTimer* timer, QList ua)
{
Q_ASSERT(timer != NULL);
if (flashing() == true || chasing == true)
{
// Keep HTP and LTP channels up. Flash is more or less a forceful intervention
// so enforce all values that the user has chosen to flash.
foreach (const SceneValue& sv, m_values.keys())
{
FadeChannel fc;
fc.setFixture(doc(), sv.fxi);
fc.setChannel(sv.channel);
quint32 uni = fc.universe();
if (uni != Universe::invalid())
ua[uni]->write(fc.address(), sv.value);
}
}
else
{
timer->unregisterDMXSource(this);
}
}
/**************************************************************************/
In function.cpp
add:
,m_chasing(false)