mirror of https://github.com/arendst/Tasmota.git
Change command ``Modules`` layout of JSON message changed to single line
This commit is contained in:
parent
10646ac28e
commit
49b5ae71ca
|
@ -4,11 +4,14 @@ All notable changes to this project will be documented in this file.
|
|||
## [Unreleased] - Development
|
||||
|
||||
## [9.4.0.5]
|
||||
### Added
|
||||
- Preliminary support for Esp32C3 - RiscV based
|
||||
|
||||
### Changed
|
||||
- Allow longer MQTT response messages by removing fixed memory buffer with size 1040 to heap allocated buffer
|
||||
- Command ``Timers`` layout of JSON message changed to single line
|
||||
- Command ``Gpio`` layout of JSON message changed to single line
|
||||
- Add preliminary support for Esp32C3 - RiscV based
|
||||
- Command ``Modules`` layout of JSON message changed to single line
|
||||
|
||||
## [9.4.0.4]
|
||||
### Added
|
||||
|
|
|
@ -89,6 +89,7 @@ The binaries can be downloaded from either https://github.com/arendst/Tasmota/tr
|
|||
- Define ``USER_BACKLOG`` to store commands at compile time to be executed at firmware load or when executing command ``reset``
|
||||
- LVGL support for TrueType fonts via FreeType library
|
||||
- Support for BM8563 RTC chip (I2C) found in M5Stack Core2 and M5StickC
|
||||
- Preliminary support for Esp32C3 - RiscV based
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
@ -97,6 +98,7 @@ The binaries can be downloaded from either https://github.com/arendst/Tasmota/tr
|
|||
- Allow longer MQTT response messages by removing fixed memory buffer with size 1040 to heap allocated buffer
|
||||
- Command ``Timers`` layout of JSON message changed to single line
|
||||
- Command ``Gpio`` layout of JSON message changed to single line
|
||||
- Command ``Modules`` layout of JSON message changed to single line
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -2387,9 +2387,6 @@ void AddLogData(uint32_t loglevel, const char* log_data) {
|
|||
Serial.printf("%s%s\r\n", mxtime, log_data);
|
||||
}
|
||||
|
||||
uint32_t log_data_len = strlen(log_data) + strlen(mxtime) + 4; // 4 = log_buffer_pointer + '\1' + '\0'
|
||||
if (log_data_len > LOG_BUFFER_SIZE) { return; } // log_data too big for buffer - discard logging
|
||||
|
||||
uint32_t highest_loglevel = Settings.weblog_level;
|
||||
if (Settings.mqttlog_level > highest_loglevel) { highest_loglevel = Settings.mqttlog_level; }
|
||||
if (TasmotaGlobal.syslog_level > highest_loglevel) { highest_loglevel = TasmotaGlobal.syslog_level; }
|
||||
|
@ -2400,12 +2397,18 @@ void AddLogData(uint32_t loglevel, const char* log_data) {
|
|||
(TasmotaGlobal.masterlog_level <= highest_loglevel)) {
|
||||
// Delimited, zero-terminated buffer of log lines.
|
||||
// Each entry has this format: [index][loglevel][log data]['\1']
|
||||
|
||||
uint32_t log_data_len = strlen(log_data);
|
||||
if (log_data_len + 64 > LOG_BUFFER_SIZE) {
|
||||
sprintf_P((char*)log_data + 128, PSTR(" ... truncated %d"), log_data_len);
|
||||
}
|
||||
|
||||
TasmotaGlobal.log_buffer_pointer &= 0xFF;
|
||||
if (!TasmotaGlobal.log_buffer_pointer) {
|
||||
TasmotaGlobal.log_buffer_pointer++; // Index 0 is not allowed as it is the end of char string
|
||||
}
|
||||
while (TasmotaGlobal.log_buffer_pointer == TasmotaGlobal.log_buffer[0] || // If log already holds the next index, remove it
|
||||
strlen(TasmotaGlobal.log_buffer) + log_data_len > LOG_BUFFER_SIZE)
|
||||
strlen(TasmotaGlobal.log_buffer) + strlen(log_data) + strlen(mxtime) + 4 > LOG_BUFFER_SIZE) // 4 = log_buffer_pointer + '\1' + '\0'
|
||||
{
|
||||
char* it = TasmotaGlobal.log_buffer;
|
||||
it++; // Skip log_buffer_pointer
|
||||
|
|
Loading…
Reference in New Issue