The field version of the solarnano grid on the ionQubes

Fork of SolarNanoGridv3 by SONG Project

Revision:
9:541c2ae1cfec
Parent:
5:57b06b4b47c6
Child:
10:30c9e8df0032
--- a/Locker/Locker.cpp	Fri Jun 03 13:24:20 2016 +0000
+++ b/Locker/Locker.cpp	Fri Jun 03 13:43:11 2016 +0000
@@ -34,6 +34,47 @@
     // No other information needed from the config file
     fclose(fp);
 
+    // ***** variables initialization *****
+    // Protected interrupts 
+    button=NULL;
+    rxWatch=NULL;
+    oneSecond=NULL;
+
+    // Protected variables: *
+    /**
+     * Open channel address of the locker
+     */
+    openAddr=0;
+
+    /**
+     * Channel address for Utility
+     */
+    addrUtil=0;
+    /**
+     * Array of battery states
+     */
+    *battIn=NULL; // array of all battery states
+    *battPipes=NULL; // array of RX pipes
+    *temp=NULL;
+    *sdBuffer=NULL;
+    sdBuffPnt=0;
+    battQP=0; // Battery queue pointer
+    pipeQP=0; // pipe q pointer (Add 2)
+    pipe = 0;
+    width = 0;
+
+    *timeValue=NULL;
+
+    now=0;
+    lastRxTme=0;
+
+    // flags
+    flagRotate=false;
+    flagNrf=0;
+    flagOneSecond=0;
+    
+    // ***** end of varibale initialization *****
+
     battIn = (char *) calloc(256, 1);
     battPipes = (char *) calloc(6, 1);
     for (int i = 0; i < 4; i++) {
@@ -53,7 +94,7 @@
 
     DBG("  Channel:%x, Address %x Util Address %x", chan, openAddr, addrUtil);
 
-    setAsRX()
+    setAsRX();
     DBG("Nrf Details:");
 #ifdef DEBUG
     nrf->printDetails();