diff --git a/tasmota/xdrv_52_0_berry_struct.ino b/tasmota/xdrv_52_0_berry_struct.ino index 760358ab0..a9c5baeea 100644 --- a/tasmota/xdrv_52_0_berry_struct.ino +++ b/tasmota/xdrv_52_0_berry_struct.ino @@ -96,4 +96,7 @@ public: }; BerrySupport berry; +// multi-purpose serial logging +extern "C" void serial_debug(const char * berry_buf, ...); + #endif // USE_BERRY diff --git a/tasmota/xdrv_52_3_berry_tasmota.ino b/tasmota/xdrv_52_3_berry_tasmota.ino index 2eb5bd738..b04ca9ba4 100644 --- a/tasmota/xdrv_52_3_berry_tasmota.ino +++ b/tasmota/xdrv_52_3_berry_tasmota.ino @@ -24,7 +24,7 @@ #include const uint32_t BERRY_MAX_LOGS = 16; // max number of print output recorded when outside of REPL, used to avoid infinite grow of logs -const uint32_t BERRY_MAX_REPL_LOGS = 1024; // max number of print output recorded when inside REPL +const uint32_t BERRY_MAX_REPL_LOGS = 50; // max number of print output recorded when inside REPL // /*********************************************************************************************\ // * Return C callback from index @@ -601,7 +601,7 @@ void berry_log(const char * berry_buf) { if (berry.log.log.length() == 0) { pre_delimiter = BERRY_CONSOLE_CMD_DELIMITER; } - if (berry.log.log.length() >= BERRY_MAX_LOGS) { + if (berry.log.log.length() >= max_logs) { berry.log.log.remove(berry.log.log.head()); } berry.log.addString(berry_buf, pre_delimiter, "\n"); diff --git a/tasmota/xdrv_52_9_berry.ino b/tasmota/xdrv_52_9_berry.ino index b234070f9..5998a8a3f 100644 --- a/tasmota/xdrv_52_9_berry.ino +++ b/tasmota/xdrv_52_9_berry.ino @@ -492,15 +492,15 @@ const char HTTP_SCRIPT_BERRY_CONSOLE[] PROGMEM = "x.onreadystatechange=function(){" "if(x.readyState==4&&x.status==200){" "var d,t1;" - "d=x.responseText.split(/" BERRY_CONSOLE_CMD_DELIMITER "/);" // Field separator - "var d1=d.shift();" + "d=x.responseText.split(/" BERRY_CONSOLE_CMD_DELIMITER "/,2);" // Field separator + "var d1=d.length>1?d[0]:null;" "if(d1){" "t1=document.createElement('div');" "t1.classList.add('br1');" "t1.innerText=d1;" "t.appendChild(t1);" "}" - "d1=d.shift();" + "d1=d.length>1?d[1]:d[0];" "if(d1){" "t1=document.createElement('div');" "t1.classList.add('br2');"