Library to control NeoPixel strings of RGB leds
Dependents: NeoPixelI2cSlave NeoPixelI2cSlave
effect.cpp
00001 #include "effect.h" 00002 00003 namespace Effects { 00004 00005 Effect::Effect(NeoPixelString * pixelstring, neopixel::Pixel color) { 00006 this->pixelstring = pixelstring; 00007 this->color = color; 00008 doExecute = false; 00009 } 00010 00011 void Effect::start(void) { 00012 doExecute = false; 00013 } 00014 00015 void Effect::stop(void) { 00016 doExecute = false; 00017 } 00018 00019 NeoPixelString * Effect::getPixelString(void) { 00020 return this->pixelstring; 00021 } 00022 00023 neopixel::Pixel Effect::getColor(void) { 00024 return color; 00025 } 00026 00027 void Effect::requestExecute(void) { 00028 doExecute = true; 00029 } 00030 00031 void Effect::clearExecute(void) { 00032 doExecute = false; 00033 } 00034 00035 bool Effect::shouldExecute(void) { 00036 return doExecute; 00037 } 00038 00039 };
Generated on Fri Jul 15 2022 00:27:27 by 1.7.2