The field version of the solarnano grid on the ionQubes

Fork of SolarNanoGridv3 by SONG Project

Revision:
13:de43f28c0365
Parent:
12:d9b13f31206d
Child:
17:dc19b3b39790
--- a/Battery/Battery.cpp	Wed Jun 08 22:48:09 2016 +0000
+++ b/Battery/Battery.cpp	Fri Jun 10 14:17:38 2016 +0000
@@ -180,9 +180,9 @@
     //
     if (((status >>MAX_RT)& 01) ==1) {
         maxRT=true;
-        DBG("MAX RT flag is set.PTB20= %d status=%x",*ce,status);
+        DBG("MAX RT flag is set. PTB20= %d status=%x",(unsigned int) *ce,status);
         *ce = 0;
-        DBG("PTB20= %d status=%x",*ce,status);
+        DBG("PTB20= %d status=%x",(unsigned int) *ce,status);
         nrf->clearStatus();
         *ledRed=0;
     }
@@ -203,6 +203,7 @@
         case ('C'):{
             doCheckIn();
             flagNextFile = 1;
+            DBG("Flag Set");
             break;}
         case ('D'):{
             flag = &flagSendFileName;
@@ -242,11 +243,11 @@
         case ('M'):{
             time_t now;
             sscanf (&dataRx[2],"%f",&maxChargeRate );
-            if(maxChargeRate>2.0){
-                maxChargeRate=2.0;
+            if(maxChargeRate>2.0f){
+                maxChargeRate=2.0f;
             }
-            if (maxChargeRate<0.0){
-                maxChargeRate=0.0;
+            if (maxChargeRate<0.0f){
+                maxChargeRate=0.0f;
             }
             DBG ("Max charge %f \n\r",maxChargeRate);
 
@@ -344,6 +345,7 @@
 void Battery::loop() {
 
     *ledGreen = !checkedIn;
+    
 
     if (flagGetTime) {
         flagGetTime=0;
@@ -357,6 +359,7 @@
     }
     if (flagNextFile) {
         flagNextFile = 0;
+        DBG("NextFile called");
         requestTime();
         nextFileToTx();
         if (fileLength>0){