Browse Source

atualizacao 18/12/2025

main
Luis Fernando Sauthier 4 months ago
parent
commit
66048d5f94
  1. 2
      git add .bat
  2. 5
      src/configuracoes.h
  3. 9
      src/controle.h
  4. 9
      src/webserver.h

2
git add .bat

@ -1,3 +1,3 @@
git add . git add .
git commit -m "atualizacao automatica" git commit -m "atualizacao 18/12/2025"
git push git push

5
src/configuracoes.h

@ -1,3 +1,6 @@
#ifndef CONFIGURACOES_H
#define CONFIGURACOES_H
// Controle de depuração global // Controle de depuração global
// Defina `DEBUG_ENABLED` como 1 para habilitar logs e instrumentação // Defina `DEBUG_ENABLED` como 1 para habilitar logs e instrumentação
// (ativa a macro `DEBUG`, habilitando `LOG/LOGLN` e trechos `#ifdef DEBUG`). // (ativa a macro `DEBUG`, habilitando `LOG/LOGLN` e trechos `#ifdef DEBUG`).
@ -46,3 +49,5 @@
// Sinalização de redraw do menu principal (extern definida em _principal.cpp) // Sinalização de redraw do menu principal (extern definida em _principal.cpp)
extern bool menuRedrawPending; extern bool menuRedrawPending;
#endif // CONFIGURACOES_H

9
src/controle.h

@ -3,10 +3,15 @@
extern bool menuRedrawPending; extern bool menuRedrawPending;
void abastecimento() void abastecimento()
{ {
StaticJsonDocument<MQTT_MAX_PACKET_SIZE> Json; LOG(F("FreeStack antes alloc: "));
LOGLN(FreeStack());
// Reduzido para 512 para economizar RAM (antes 800 estava travando)
const size_t JSON_BUFFER_SIZE = 512;
StaticJsonDocument<JSON_BUFFER_SIZE> Json;
String msgID = generateUID(); String msgID = generateUID();
char pub_message[MQTT_MAX_PACKET_SIZE]; char pub_message[JSON_BUFFER_SIZE];
const char* folder = "envios"; const char* folder = "envios";
char path[64]; char path[64];

9
src/webserver.h

@ -549,10 +549,13 @@ void atualizaEnviosPendentes( String mensagem)
void enviarAbastecimento() void enviarAbastecimento()
{ {
LOGLN(F("Enviando dados de abastecimento pendente")); LOGLN(F("Enviando dados de abastecimento pendente"));
LOG(F("FreeStack inicio: "));
LOGLN(FreeStack());
StaticJsonDocument<600> Json; const size_t JSON_BUFFER_SIZE = 512;
char in_message[MQTT_MAX_PACKET_SIZE]; StaticJsonDocument<JSON_BUFFER_SIZE> Json;
char out_message[MQTT_MAX_PACKET_SIZE]; char in_message[JSON_BUFFER_SIZE];
char out_message[JSON_BUFFER_SIZE];
byte tentativas = 0; byte tentativas = 0;

Loading…
Cancel
Save