Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnSDUtils.cpp
- Revision:
- 39:2f17131d22a5
- Parent:
- 38:9070c17536cd
- Child:
- 40:1324da35afd4
--- a/SnSDUtils.cpp Wed May 29 18:54:19 2013 +0000 +++ b/SnSDUtils.cpp Tue Jul 30 02:03:21 2013 +0000 @@ -132,7 +132,7 @@ std::string rdnms ( GetSubDirFor(run, 0, rdlen, false) ); const char* rdnm = rdnms.c_str(); // open/make the run directory - FATDirHandle* rd(dynamic_cast<FATDirHandle*>( OpenOrMakeDir(rdnm) )); + FATDirHandle* rd(static_cast<FATDirHandle*>( OpenOrMakeDir(rdnm) )); struct dirent* rdent; uint16_t dseq(0), maxs(0); #ifdef DEBUG @@ -176,7 +176,7 @@ // don't compare seq#. don't use num of chars in case seq is >999 const int32_t ncomp = strrchr(fn, 's') - fn; // open (or make) the run/seq dir - rd = dynamic_cast<FATDirHandle*>( OpenOrMakeDir(rdnm) ); + rd = static_cast<FATDirHandle*>( OpenOrMakeDir(rdnm) ); // get the new sequence number (ok if it overflows this seq "bin") maxs=0; while ( (rdent = readdir(rd))!=NULL ) { @@ -373,7 +373,7 @@ struct dirent* dent; Watchdog::kick(); // don't reset if ( (d = opendir( dirname ))!=NULL ) { - FATDirHandle* dir = dynamic_cast<FATDirHandle*>(d); + FATDirHandle* dir = static_cast<FATDirHandle*>(d); while ( (dent = readdir(d))!=NULL ) { printf("dn=%s. datr=%02x. dir=%d\r\n", dent->d_name, @@ -396,7 +396,7 @@ nfiles = 0; totbytes = 0; struct dirent* dent; - FATDirHandle* d = dynamic_cast<FATDirHandle*>( opendir(dirname) ); + FATDirHandle* d = static_cast<FATDirHandle*>( opendir(dirname) ); if (d!=0) { while ( (dent = readdir(d))!=NULL ) { Watchdog::kick(); // don't reset @@ -491,7 +491,7 @@ DIR* d; struct dirent* dent; if ( (d = opendir( dirname ))!=NULL ) { - FATDirHandle* dir = dynamic_cast<FATDirHandle*>(d); + FATDirHandle* dir = static_cast<FATDirHandle*>(d); while ( (dent = readdir(d))!=NULL ) { Watchdog::kick(); // don't reset if ( (dir->filinfo()->fattrib & AM_DIR)!=0 ) { @@ -562,7 +562,7 @@ DIR* d; struct dirent* dent; if ( (d = opendir( dirname ))!=NULL ) { - FATDirHandle* dir = dynamic_cast<FATDirHandle*>(d); + FATDirHandle* dir = static_cast<FATDirHandle*>(d); while ( (dent = readdir(d))!=NULL ) { Watchdog::kick(); // don't reset SnCommWin::ECommWinResult res = rs;