Merge pull request #14422 from s-hadinger/udisplay_reduced_logs

Reduced logs for uDisplay
This commit is contained in:
Theo Arends 2022-01-14 09:06:27 +01:00 committed by GitHub
commit a3c31fdf76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 16 deletions

View File

@ -20,7 +20,7 @@
#include <Arduino.h> #include <Arduino.h>
#include "uDisplay.h" #include "uDisplay.h"
#define UDSP_DEBUG // #define UDSP_DEBUG
const uint16_t udisp_colors[]={UDISP_BLACK,UDISP_WHITE,UDISP_RED,UDISP_GREEN,UDISP_BLUE,UDISP_CYAN,UDISP_MAGENTA,\ const uint16_t udisp_colors[]={UDISP_BLACK,UDISP_WHITE,UDISP_RED,UDISP_GREEN,UDISP_BLUE,UDISP_CYAN,UDISP_MAGENTA,\
UDISP_YELLOW,UDISP_NAVY,UDISP_DARKGREEN,UDISP_DARKCYAN,UDISP_MAROON,UDISP_PURPLE,UDISP_OLIVE,\ UDISP_YELLOW,UDISP_NAVY,UDISP_DARKGREEN,UDISP_DARKCYAN,UDISP_MAROON,UDISP_PURPLE,UDISP_OLIVE,\

View File

@ -83,7 +83,7 @@ extern const bcstring be_const_str_SERIAL_8O1;
extern const bcstring be_const_str_SERIAL_8O2; extern const bcstring be_const_str_SERIAL_8O2;
extern const bcstring be_const_str_SK6812_GRBW; extern const bcstring be_const_str_SK6812_GRBW;
extern const bcstring be_const_str_STATE_DEFAULT; extern const bcstring be_const_str_STATE_DEFAULT;
extern const bcstring be_const_str_TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27; extern const bcstring be_const_str_TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27;
extern const bcstring be_const_str_Tasmota; extern const bcstring be_const_str_Tasmota;
extern const bcstring be_const_str_Tele; extern const bcstring be_const_str_Tele;
extern const bcstring be_const_str_Timer; extern const bcstring be_const_str_Timer;

View File

@ -147,7 +147,7 @@ be_define_const_str(SERIAL_8O1, "SERIAL_8O1", 289122742u, 0, 10, &be_const_str_c
be_define_const_str(SERIAL_8O2, "SERIAL_8O2", 272345123u, 0, 10, NULL); be_define_const_str(SERIAL_8O2, "SERIAL_8O2", 272345123u, 0, 10, NULL);
be_define_const_str(SK6812_GRBW, "SK6812_GRBW", 81157857u, 0, 11, &be_const_str_time_str); be_define_const_str(SK6812_GRBW, "SK6812_GRBW", 81157857u, 0, 11, &be_const_str_time_str);
be_define_const_str(STATE_DEFAULT, "STATE_DEFAULT", 712406428u, 0, 13, &be_const_str_srand); be_define_const_str(STATE_DEFAULT, "STATE_DEFAULT", 712406428u, 0, 13, &be_const_str_srand);
be_define_const_str(TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27, "TAP: found Tasmota App '%s'", 2643152398u, 0, 27, &be_const_str_get_option); be_define_const_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27, "TAP: Loaded Tasmota App '%s'", 926477145u, 0, 28, &be_const_str_consume_silence);
be_define_const_str(Tasmota, "Tasmota", 4047617668u, 0, 7, &be_const_str_file); be_define_const_str(Tasmota, "Tasmota", 4047617668u, 0, 7, &be_const_str_file);
be_define_const_str(Tele, "Tele", 1329980653u, 0, 4, &be_const_str_pop_path); be_define_const_str(Tele, "Tele", 1329980653u, 0, 4, &be_const_str_pop_path);
be_define_const_str(Timer, "Timer", 3948127682u, 0, 5, NULL); be_define_const_str(Timer, "Timer", 3948127682u, 0, 5, NULL);
@ -848,7 +848,7 @@ static const bstring* const m_string_table[] = {
(const bstring *)&be_const_str_find, (const bstring *)&be_const_str_find,
(const bstring *)&be_const_str_SERIAL_8E2, (const bstring *)&be_const_str_SERIAL_8E2,
NULL, NULL,
(const bstring *)&be_const_str_consume_silence, (const bstring *)&be_const_str_TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27,
(const bstring *)&be_const_str_False, (const bstring *)&be_const_str_False,
(const bstring *)&be_const_str__settings_def, (const bstring *)&be_const_str__settings_def,
(const bstring *)&be_const_str__X23, (const bstring *)&be_const_str__X23,
@ -1141,7 +1141,7 @@ static const bstring* const m_string_table[] = {
(const bstring *)&be_const_str__write, (const bstring *)&be_const_str__write,
NULL, NULL,
NULL, NULL,
(const bstring *)&be_const_str_TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27, (const bstring *)&be_const_str_get_option,
(const bstring *)&be_const_str_wifi, (const bstring *)&be_const_str_wifi,
(const bstring *)&be_const_str_OPTION_A, (const bstring *)&be_const_str_OPTION_A,
(const bstring *)&be_const_str_True, (const bstring *)&be_const_str_True,

View File

@ -61,7 +61,7 @@ be_local_closure(Tapp_autoexec, /* name */
/* K7 */ be_nested_str(tasmota), /* K7 */ be_nested_str(tasmota),
/* K8 */ be_nested_str(log), /* K8 */ be_nested_str(log),
/* K9 */ be_nested_str(format), /* K9 */ be_nested_str(format),
/* K10 */ be_nested_str(TAP_X3A_X20found_X20Tasmota_X20App_X20_X27_X25s_X27), /* K10 */ be_nested_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27),
/* K11 */ be_const_int(2), /* K11 */ be_const_int(2),
/* K12 */ be_nested_str(load), /* K12 */ be_nested_str(load),
/* K13 */ be_nested_str(_X23autoexec_X2Ebe), /* K13 */ be_nested_str(_X23autoexec_X2Ebe),

View File

@ -19,7 +19,7 @@ tapp_module.init = def (m)
for d: dir for d: dir
if string.find(d, ".tapp") > 0 if string.find(d, ".tapp") > 0
tasmota.log(string.format("TAP: found Tasmota App '%s'", d), 2) tasmota.log(string.format("TAP: Loaded Tasmota App '%s'", d), 2)
tasmota.load(d + "#autoexec.be") tasmota.load(d + "#autoexec.be")
end end
end end

View File

@ -317,7 +317,7 @@ void BerryInit(void) {
be_pop(berry.vm, 1); be_pop(berry.vm, 1);
} }
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_BERRY "Berry initialized, RAM used=%u"), callBerryGC()); AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_BERRY "Berry initialized, RAM used=%u bytes"), callBerryGC());
berry_init_ok = true; berry_init_ok = true;
// we generate a synthetic event `autoexec` // we generate a synthetic event `autoexec`

View File

@ -79,7 +79,7 @@ int8_t cs;
if (desc) { if (desc) {
memcpy_P(fbuff, desc, DISPDESC_SIZE - 1); memcpy_P(fbuff, desc, DISPDESC_SIZE - 1);
ddesc = fbuff; ddesc = fbuff;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: const char descriptor used")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: const char descriptor used"));
} }
@ -92,7 +92,7 @@ int8_t cs;
fp.read((uint8_t*)fbuff, size); fp.read((uint8_t*)fbuff, size);
fp.close(); fp.close();
ddesc = fbuff; ddesc = fbuff;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: File descriptor used")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: File descriptor used"));
} }
} }
#endif // USE_UFILESYS #endif // USE_UFILESYS
@ -106,7 +106,7 @@ int8_t cs;
while (*lp != '\n') lp++; while (*lp != '\n') lp++;
memcpy(fbuff, lp + 1, DISPDESC_SIZE - 1); memcpy(fbuff, lp + 1, DISPDESC_SIZE - 1);
ddesc = fbuff; ddesc = fbuff;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: Script descriptor used")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: Script descriptor used"));
} }
} }
#endif // USE_SCRIPT #endif // USE_SCRIPT
@ -123,7 +123,7 @@ int8_t cs;
if (fbuff[cnt] == ' ') fbuff[cnt] = '\n'; if (fbuff[cnt] == ' ') fbuff[cnt] = '\n';
} }
ddesc = fbuff; ddesc = fbuff;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: Rule 3 descriptor used")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: Rule 3 descriptor used"));
} }
} }
@ -134,12 +134,12 @@ int8_t cs;
if (!ddesc) { if (!ddesc) {
memcpy_P(fbuff, DSP_SAMPLE_DESC, sizeof(DSP_SAMPLE_DESC)); memcpy_P(fbuff, DSP_SAMPLE_DESC, sizeof(DSP_SAMPLE_DESC));
ddesc = fbuff; ddesc = fbuff;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: Flash descriptor used")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: Flash descriptor used"));
} }
#endif // DSP_ROM_DESC #endif // DSP_ROM_DESC
if (!ddesc) { if (!ddesc) {
AddLog(LOG_LEVEL_INFO, PSTR("DSP: No valid descriptor found")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: No valid descriptor found"));
if (fbuff) free(fbuff); if (fbuff) free(fbuff);
return 0; return 0;
} }
@ -238,7 +238,7 @@ int8_t cs;
// init renderer // init renderer
if (renderer) { if (renderer) {
delete renderer; delete renderer;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: reinit")); AddLog(LOG_LEVEL_DEBUG, PSTR("DSP: reinit"));
} }
udisp = new uDisplay(ddesc); udisp = new uDisplay(ddesc);
@ -328,7 +328,7 @@ int8_t cs;
#endif // SHOW_SPLASH #endif // SHOW_SPLASH
udisp_init_done = true; udisp_init_done = true;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: %s!"), renderer->devname()); AddLog(LOG_LEVEL_INFO, PSTR("DSP: Configured display '%s'"), renderer->devname());
return renderer; return renderer;
} }