Library to control NeoPixel strings of RGB leds

Dependencies:   PixelArray

Dependents:   NeoPixelI2cSlave NeoPixelI2cSlave

Effects/effects_manager.cpp

Committer:
dwini
Date:
2016-04-15
Revision:
3:7d32f46a38d3
Parent:
1:f544810b6598

File content as of revision 3:7d32f46a38d3:

#include "effects_manager.h"

namespace Effects {
    
    EffectsManager::EffectsManager(void) {
        effect = 0;
    }
    
    void EffectsManager::registerEffect(Effect * effect) {
        this->effect = effect;
        effect->start();
    }
    
    void EffectsManager::execute(void) {
        if (effect) {
            effect->execute();
        }
    }
    
    void EffectsManager::unregisterEffect(void) {
        effect->stop();
        effect = 0;
    }

};