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

@@ -21,16 +21,12 @@ extern "C" {
#include "esp_http_server.h"
#include "../../include/defines.h"
static const char *TAG = "SERVER HELP";
#define SCRATCH_BUFSIZE 8192
char scratch[SCRATCH_BUFSIZE];
#define IS_FILE_EXT(filename, ext) \
(strcasecmp(&filename[strlen(filename) - sizeof(ext) + 1], ext) == 0)
char scratch[SERVER_HELPER_SCRATCH_BUFSIZE];
esp_err_t send_file(httpd_req_t *req, std::string filename)
{
@@ -51,7 +47,7 @@ esp_err_t send_file(httpd_req_t *req, std::string filename)
size_t chunksize;
do {
/* Read file in chunks into the scratch buffer */
chunksize = fread(chunk, 1, SCRATCH_BUFSIZE, fd);
chunksize = fread(chunk, 1, SERVER_HELPER_SCRATCH_BUFSIZE, fd);
/* Send the buffer contents as HTTP response chunk */
if (httpd_resp_send_chunk(req, chunk, chunksize) != ESP_OK) {