Rob Dobson / Mbed 2 deprecated SpideyWallWeb

Dependencies:   EthernetInterfacePlusHostname RdWebServer mbed-rtos mbed

Revision:
0:887096209439
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EffectSmooth.h	Tue Aug 18 16:03:29 2015 +0000
@@ -0,0 +1,52 @@
+// 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();
+        }
+};
+