Component Test's Software to work with "Universal Controller Box" - Software is an interpreter or "compiler" for programs to be done with a .txt file and read off of the SD Card

Dependencies:   BridgeDriver FrontPanelButtons MCP23017 SDFileSystem TextLCD mbed

Revision:
3:078e9a1e8be3
Parent:
2:3e7baa3e3fec
Child:
4:86d0d04cc055
diff -r 3e7baa3e3fec -r 078e9a1e8be3 Initialization.hpp
--- a/Initialization.hpp	Thu Sep 18 23:38:11 2014 +0000
+++ b/Initialization.hpp	Fri Sep 19 00:46:26 2014 +0000
@@ -10,6 +10,26 @@
 #include <string>
 #include <vector>
 
+
+/**********************************************************************************************************************************/
+/**********************************************************************************************************************************/
+/**************************                              <MUST MODIFY>                                    *************************/
+/**********************************************************************************************************************************/
+/**********************************************************************************************************************************/
+
+enum  DeviceType{MOTOR, VOLTAGE_DRIVER};                                //ADD DEVICE NAME
+static const enum DeviceType Device_Map[] = {MOTOR, VOLTAGE_DRIVER};    //AND HERE ***NOTE TO KEEP SAME ORDER
+
+/**************************                              <MUST MODIFY>                                    *************************/
+/**********************************************************************************************************************************/
+/**********************************************************************************************************************************/
+
+
+
+/******************************************************************************/
+/***                       <Global Initializations>                         ***/
+/******************************************************************************/
+
 //Initializations
 extern Timer timer;    // general purpose timer
 extern I2C i2c; // I2C bus (SDA, SCL)
@@ -21,10 +41,20 @@
 
 extern const int MAX_LINE_LENGTH;
 
-void fullInit();
+
+/******************************************************************************/
+/***                     <Function Initializations>                         ***/
+/******************************************************************************/
+
+void fullInit(); //Perform and call any needed initializations
  
-void initLCD(void);
+void initLCD(void); //Initialize the LCD
+
+
 
+/******************************************************************************/
+/***                 <Line Data Struct Initializations>                     ***/
+/******************************************************************************/
 
 struct Line{
     
@@ -42,10 +72,11 @@
 
 
 
+/******************************************************************************/
+/***              <Parent Device Class Initializations>                     ***/
+/******************************************************************************/
 
-enum  DeviceType{MOTOR, VOLTAGE_DRIVER}; 
-static const enum DeviceType Device_Map[] = {MOTOR, VOLTAGE_DRIVER}; 
-extern const char *DeviceNames[];
+extern const string DeviceNames[];
 extern int numDevices;
 extern int currNumDevices;
 
@@ -56,20 +87,10 @@
         string name;
         enum DeviceType type;
         static Device* newDevice(int, string, Line);
-        //void setName(string);
-        //void setType(DeviceType);
         virtual int interpret(Line&) = 0;
-        /*{
-            lcd.setAddress(0,3);
-            lcd.printf("CHECK Device   ");
-            wait(2);
-            return 0;
-        }*/
 };
 
 extern vector<Device*> devices; //Initialize array of devices, initially assume 15 devices will be used (will expand as needed)
-//extern Device devices[];
 
-void addDevice(int, Line);
 
 #endif
\ No newline at end of file