Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterfacePlusHostname RdWebServer mbed-rtos mbed
Diff: EffectSmooth.h
- Revision:
- 1:362331cec9b7
- Parent:
- 0:887096209439
- Child:
- 2:99eb4c6e9ea4
--- a/EffectSmooth.h Tue Aug 18 16:03:29 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Smooth transition effect
-#include "Effect.h"
-#include "colourconverters.h"
-
-class EffectSmooth : public virtual Effect
-{
- private:
- int genCount;
- ledstrip* pLedStrip;
- HsvColor curHsv;
-
- public:
- EffectSmooth(ledstrip* pleds) : Effect(), curHsv(0,0,0)
- {
- genCount = 0;
- pLedStrip = pleds;
- }
-
- virtual char* GetName()
- {
- return "smooth";
- }
-
- virtual void Init(char* argStr)
- {
- return;
- genCount = 0;
- pLedStrip->Clear();
- pLedStrip->ShowLeds();
- RgbColor startRGB(60,0,0);
- curHsv = RgbToHsv(startRGB);
- }
-
- virtual void NextGen()
- {
- return;
- pLedStrip->Clear();
- RgbColor colrVal = HsvToRgb(curHsv);
- pLedStrip->Fill(0,pLedStrip->GetNumLeds(),colrVal.r, colrVal.g, colrVal.b);
- pLedStrip->ShowLeds();
- curHsv.h++;
- }
-
- virtual void Stop()
- {
- return;
-
- pLedStrip->Clear();
- pLedStrip->ShowLeds();
- }
-};
-