Nick Lowyck / Mbed 2 deprecated Ledcube

Dependencies:   mbed mbed-rtos

Revision:
5:e4ed6c5baf89
Parent:
4:a091b8f8216d
--- a/Cube/LedCube.h	Sun May 04 20:41:10 2014 +0000
+++ b/Cube/LedCube.h	Thu May 08 18:59:52 2014 +0000
@@ -1,35 +1,30 @@
-#ifndef LedCube_h
-#define LedCube_h
-
+#include "iostream"
 #include "mbed.h"
-#include "iostream"
-
-class LedCube
-{
-private:
-
-    char rValues[8][8] ; //matrix (8*8*8): top to bottom, eerst r dan g dan b dan laag (per laag, dus 33 chars)(één char:rij voor één kleur)
-    char gValues[8][8] ;
-    char bValues[8][8] ;
+#ifndef LedCube_h
+#define LedCube_h 
+enum Color_led { l_red, l_green, l_blue };
+class LedCube{
+    private:
+        unsigned char rValues[8][8] ;
+        unsigned char gValues[8][8];
+        unsigned char bValues[8][8];
 
-    enum {address,red,green,blue} status;
-    int layer_current;
-    int rank_current;
-
-    char layer_oneHot;
+        //indexes
+        int x_current;
+        int y_current;
+        int z_current;
+        
+        enum{address,red,green,blue} status;
+        int layer_current;
+        int rank_current;
 
-public:
-    enum TestConfig {firsthalfwhite, secondhalfwhite};
-    LedCube();
-    ~LedCube();
-    void clearValues();
-    char getNextValue();
-    void setData(char* data);
-    void testMode(TestConfig testconfig);
-    void printrValues();
-    void printgValues();
-    void printbValues();
-    void printAll();
+        unsigned char layer_oneHot;
+
+    public:
+        LedCube();
+        unsigned char getNextValue();
+        void setData(unsigned char* data);
+        void printValues(Color_led color);
+        void printAll();
 };
 #endif
-