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

@@ -37,20 +37,11 @@
#include "ClassLogFile.h"
#include "Helper.h"
// #define DEBUG_DETAIL_ON
#define BUFFSIZE 1024
#define HASH_LEN 32 /* SHA-256 digest length */
#include "../../include/defines.h"
/*an ota data write buffer ready to write to the flash*/
static char ota_write_data[BUFFSIZE + 1] = { 0 };
static char ota_write_data[SERVER_OTA_SCRATCH_BUFSIZE + 1] = { 0 };
#define OTA_URL_SIZE 256
static const char *TAG = "OTA";
esp_err_t handler_reboot(httpd_req_t *req);
@@ -169,7 +160,7 @@ static bool ota_update_task(std::string fn)
return false;
}
data_read = fread(ota_write_data, 1, BUFFSIZE, f);
data_read = fread(ota_write_data, 1, SERVER_OTA_SCRATCH_BUFSIZE, f);
while (data_read > 0) {
if (data_read < 0) {
@@ -239,7 +230,7 @@ static bool ota_update_task(std::string fn)
break;
}
}
data_read = fread(ota_write_data, 1, BUFFSIZE, f);
data_read = fread(ota_write_data, 1, SERVER_OTA_SCRATCH_BUFSIZE, f);
}
fclose(f);