mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-13 02:09:58 +01:00
Use ESP Logging Macros for utils
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 - 2024 Thomas Basler and others
|
* Copyright (C) 2022-2025 Thomas Basler and others
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
#include "MessageOutput.h"
|
|
||||||
#include "PinMapping.h"
|
#include "PinMapping.h"
|
||||||
#include <LittleFS.h>
|
#include <LittleFS.h>
|
||||||
#include <MD5Builder.h>
|
#include <MD5Builder.h>
|
||||||
|
|
||||||
|
#undef TAG
|
||||||
|
static const char* TAG = "utils";
|
||||||
|
|
||||||
uint32_t Utils::getChipId()
|
uint32_t Utils::getChipId()
|
||||||
{
|
{
|
||||||
uint32_t chipId = 0;
|
uint32_t chipId = 0;
|
||||||
@@ -61,7 +63,7 @@ int Utils::getTimezoneOffset()
|
|||||||
bool Utils::checkJsonAlloc(const JsonDocument& doc, const char* function, const uint16_t line)
|
bool Utils::checkJsonAlloc(const JsonDocument& doc, const char* function, const uint16_t line)
|
||||||
{
|
{
|
||||||
if (doc.overflowed()) {
|
if (doc.overflowed()) {
|
||||||
MessageOutput.printf("Alloc failed: %s, %" PRIu16 "\n", function, line);
|
ESP_LOGE(TAG, "Alloc failed: %s, %" PRIu16 "", function, line);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user