Skip to content
Snippets Groups Projects
Commit b59fb331 authored by Alberto Nidasio's avatar Alberto Nidasio
Browse files

[Logger] Changed configuration for STM32F2

parent 986d0cfe
Branches
Tags
No related merge requests found
...@@ -55,9 +55,7 @@ bool Logger::start() ...@@ -55,9 +55,7 @@ bool Logger::start()
filename = getFileName(fileNumber); filename = getFileName(fileNumber);
struct stat st; struct stat st;
if (stat(filename.c_str(), &st) != 0) if (stat(filename.c_str(), &st) != 0)
{
break; break;
}
if (fileNumber == maxFilenameNumber - 1) if (fileNumber == maxFilenameNumber - 1)
TRACE("Too many log files, appending data to last\n"); TRACE("Too many log files, appending data to last\n");
......
...@@ -124,7 +124,7 @@ public: ...@@ -124,7 +124,7 @@ public:
*/ */
void logStats(); void logStats();
private: public:
Logger(); Logger();
static std::string getFileName(int logNumber); static std::string getFileName(int logNumber);
...@@ -153,10 +153,17 @@ private: ...@@ -153,10 +153,17 @@ private:
LoggerResult logImpl(const char *name, const void *data, unsigned int size); LoggerResult logImpl(const char *name, const void *data, unsigned int size);
static constexpr unsigned int maxFilenameNumber = 100; ///< Limit on files static constexpr unsigned int maxFilenameNumber = 100; ///< Limit on files
#ifndef _ARCH_CORTEXM3_STM32F2
static constexpr unsigned int maxRecordSize = 512; ///< Limit on data static constexpr unsigned int maxRecordSize = 512; ///< Limit on data
static constexpr unsigned int numRecords = 512; ///< Size of record queues static constexpr unsigned int numRecords = 512; ///< Size of record queues
static constexpr unsigned int numBuffers = 8; ///< Number of buffers static constexpr unsigned int numBuffers = 8; ///< Number of buffers
static constexpr unsigned int bufferSize = 64 * 1024; ///< Size of buffers static constexpr unsigned int bufferSize = 64 * 1024; ///< Size of buffers
#else
static constexpr unsigned int maxRecordSize = 512; ///< Limit on data
static constexpr unsigned int numRecords = 64; ///< Size of record queues
static constexpr unsigned int numBuffers = 8; ///< Number of buffers
static constexpr unsigned int bufferSize = 4 * 1024; ///< Size of buffers
#endif
/** /**
* A record is a single serialized logged class. Records are used to * A record is a single serialized logged class. Records are used to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment