Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Revision:
66:685f9d0a48ae
Parent:
65:2cb3e99ce466
Child:
67:ec999336fcd1
--- a/SnSDUtils.cpp	Fri Nov 28 07:47:34 2014 +0000
+++ b/SnSDUtils.cpp	Tue Dec 02 21:55:27 2014 +0000
@@ -742,6 +742,7 @@
 
 SnCommWin::ECommWinResult
 SnSDUtils::SendOneFile(const char* dfn,
+                       const bool determineDir,
                        SnCommWin* comm,
                        const uint32_t timeout,
                        char* const buf,
@@ -763,7 +764,7 @@
         // file must already be written out!
         f = GetCurFile();
     } else {
-        f = OpenExistingFile(dfn, false, false);
+        f = OpenExistingFile(dfn, false, determineDir);
     }
 
 #ifdef DEBUG
@@ -852,7 +853,7 @@
     
     // send it
     const SnCommWin::ECommWinResult res = 
-        SendOneFile(dfn.c_str(), comm, timeout, buf, bsize,
+        SendOneFile(dfn.c_str(), false, comm, timeout, buf, bsize,
                     curConf, evt, pow);
     
     // see if we need to remove this directory now
@@ -1061,7 +1062,7 @@
                                  dnm.c_str());
                 } else if (strncmp(dent->d_name, "SnEvts", 6)==0) {
                     // a data file (send it)
-                    res = SendOneFile(dent->d_name, comm, timeout, buf, bsize,
+                    res = SendOneFile(dent->d_name, true, comm, timeout, buf, bsize,
                                       curConf, evt, pow);
                 }
                 if ((res<rs) || (res==SnCommWin::kOkStopComm)) {