Menu

Idea: Fix for chase to end in previous values instead of it's stop values

dmxWolf
2015-02-14
2015-02-14
  • dmxWolf

    dmxWolf - 2015-02-14

    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<Universe *=""> 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)

     
    • dmxWolf

      dmxWolf - 2015-02-14

      Obviously you wouldn't want the chase button to always want the button itself to be a flash button, but it would be nice if flash buttons could use chases and efx's besides just scenes.

       
  • Massimo Callegari

    Moved to development.
    Please do not suppose we can read your mind.

    Properly explain:
    - the problem
    - the expected behaviour
    - how you tested it (eventually sharing a project)
    - all the other tests you've done with your modified code to make sure you didn't break any other existing logic

     
  • dmxWolf

    dmxWolf - 2015-02-14

    Come to think of it, this wouldn't work, because only intensity channels get returned to their previous values. You can delete this thread.

     

    Last edit: dmxWolf 2015-02-14
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.