Skip to content

Commit

Permalink
libs update
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Jan 1, 2025
1 parent c06be8c commit 4536993
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/WebSerialPro
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ lib_deps =
mathieucarbou/MycilaESPConnect @ 7.0.0
mathieucarbou/MycilaEasyDisplay @ 3.0.3
mathieucarbou/MycilaHADiscovery @ 6.0.1
mathieucarbou/MycilaJSY @ 13.0.0
mathieucarbou/MycilaJSY @ 13.0.1
mathieucarbou/MycilaLogger @ 3.2.1
mathieucarbou/MycilaMQTT @ 6.0.4
mathieucarbou/MycilaNTP @ 6.0.5
Expand Down Expand Up @@ -162,7 +162,7 @@ build_unflags =
[oss]
build_flags = -D APP_MODEL_OSS
lib_deps =
mathieucarbou/MycilaWebSerial @ 7.0.1
mathieucarbou/MycilaWebSerial @ 8.0.0
; ayushsharma82/ESP-DASH @ 4.0.8
https://github.com/mathieucarbou/ayushsharma82-ESP-DASH#dev-v5
lib_ignore =
Expand Down
16 changes: 7 additions & 9 deletions src/yasolr_logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
*/
#include <yasolr.h>

static const Mycila::TaskDoneCallback LOG_EXEC_TIME = [](const Mycila::Task& me, const uint32_t elapsed) {
logger.debug(TAG, "Task '%s' finished in %" PRIu32 " us", me.getName(), elapsed);
};

Mycila::Logger logger;
Mycila::Task* loggingTask;
WebSerial* webSerial;

void yasolr_init_logging() {
logger.info(TAG, "Initialize logging...");
Expand All @@ -19,12 +16,13 @@ void yasolr_init_logging() {
esp_log_level_set("*", static_cast<esp_log_level_t>(ARDUHAL_LOG_LEVEL_DEBUG));

#ifdef APP_MODEL_PRO
WebSerial.setID(Mycila::AppInfo.firmware.c_str());
WebSerial.setTitle((Mycila::AppInfo.name + " Web Console").c_str());
WebSerial.setInput(false);
webSerial = new WebSerial();
webSerial->setID(Mycila::AppInfo.firmware.c_str());
webSerial->setTitle((Mycila::AppInfo.name + " Web Console").c_str());
webSerial->setInput(false);
#endif
WebSerial.begin(&webServer, "/console");
logger.forwardTo(&WebSerial);
webSerial->begin(&webServer, "/console");
logger.forwardTo(webSerial);

loggingTask = new Mycila::Task("Debug", [](void* params) {
logger.info(TAG, "Free Heap: %" PRIu32, ESP.getFreeHeap());
Expand Down

0 comments on commit 4536993

Please sign in to comment.