ELEC2645 (2019/20) / Mbed 2 deprecated el18loc_final

Dependencies:   mbed

Revision:
21:60f01b17b0a6
Parent:
15:1c67f064278e
Child:
30:08cc4ec58d07
--- a/LUTs/LUTs.h	Fri May 22 21:11:12 2020 +0000
+++ b/LUTs/LUTs.h	Sat May 23 14:40:40 2020 +0000
@@ -14,32 +14,54 @@
 class LUTs
 {
 public:
-    //constructor
+    /** Constructor */
     LUTs();
-    //destructior
+    /** Destructior */
     ~LUTs();
 
     //methods
+    /** Generates all wavetables using preset central values
+    * @genrates preset wavetables
+    * @Outputs as global variables
+    * @1024 Points per table (0->(2^16)-1)
+    */ 
     void initial_wavetables();
+    
+    /**Generatres Sin Wavetable
+    * @outputs Sin Wavetable as Global Variable
+    */
     void sin_wavetable();
+    
+    /**Generatres Tri Wavetable
+    * @outputs Tri Wavetable as Global Variable
+    * @with defined PulseWidth
+    */
     void tri_wavetable(int pulsewidth);
+    
+    /**Generatres Pulse Wavetable
+    * @outputs Pulse Wavetable as Global Variable
+    * @with defined PulseWidth
+    */
     void pulse_wavetable(int pulsewidth);
 
 private:
 //variables
-    double rem;
-    float sin_d;
-    uint16_t sin_u;
-    float dif;
-    uint16_t dif_u;
-    int i;
-    float rise_t;
-    uint16_t rise_tu;
-    uint16_t fall_tu;
-    float up_t;
-    int up_tu;
+    double rem; //Remainder (used for rounding)
+    float sin_d; //Sin Double var
+    uint16_t sin_u; //Sin Unsigned var
+    float dif; //Difference required in Tri wav
+    uint16_t dif_u; //Unsigned version of dif
+    int i; //Itterator
+    float rise_t; //Rise time for tri wav
+    uint16_t rise_tu; //Unsigned version of rise_t
+    uint16_t fall_tu; //unsigned measure of fall time for tri wav
+    float up_t; //Time At max for square
+    int up_tu; //Unsigned version of up_t
     
     //Methods
+    /**Prints Certain Tri wavetable results for checking
+    * @prints certain tri_wav values for debug
+    */
     void tri_wav_results();
 };
 #endif
\ No newline at end of file