Centralizing the defines (#1624)

* defines changes

* Finish #define move + #define STBI_ONLY_JPEGsave 2% of Flash

* remove the defines on the old places

* ClassFlowCNNGeneral in define.h

* revert to origin

* fix translation not ready
This commit is contained in:
Nicolas Liaudat
2022-12-19 21:43:30 +01:00
committed by GitHub
parent 834fd60983
commit b0726b6c7e
45 changed files with 331 additions and 336 deletions

View File

@@ -23,6 +23,7 @@ extern "C" {
#include <string.h>
#include <esp_log.h>
#include "../../include/defines.h"
#include "ClassLogFile.h"
@@ -31,9 +32,6 @@ extern "C" {
static const char* TAG = "HELPER";
//#define ISWINDOWS_TRUE
#define PATH_MAX_STRING_SIZE 256
using namespace std;
unsigned int systemStatus = 0;
@@ -426,14 +424,14 @@ string getFileType(string filename)
/* recursive mkdir */
int mkdir_r(const char *dir, const mode_t mode) {
char tmp[PATH_MAX_STRING_SIZE];
char tmp[FILE_PATH_MAX];
char *p = NULL;
struct stat sb;
size_t len;
/* copy path */
len = strnlen (dir, PATH_MAX_STRING_SIZE);
if (len == 0 || len == PATH_MAX_STRING_SIZE) {
len = strnlen (dir, FILE_PATH_MAX);
if (len == 0 || len == FILE_PATH_MAX) {
return -1;
}
memcpy (tmp, dir, len);