mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-28 01:29:07 +03:00
tidy up EMSESP_DEBUG
This commit is contained in:
@@ -93,7 +93,7 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
||||
bool psram = false;
|
||||
#endif
|
||||
|
||||
#ifdef EMSESP_DEBUG
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().debug("NVS boot value=[%s], board profile=[%s], EMSESP_DEFAULT_BOARD_PROFILE=[%s]",
|
||||
EMSESP::nvs_.getString("boot").c_str(),
|
||||
root["board_profile"] | "",
|
||||
@@ -111,7 +111,7 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
||||
if (!EMSESP::system_.getBBQKeesGatewayDetails().isEmpty()) {
|
||||
String nvs_boot = EMSESP::nvs_.getString("boot");
|
||||
if (!nvs_boot.isEmpty()) {
|
||||
#ifdef EMSESP_DEBUG
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().debug("Overriding board profile with NVS boot value %s");
|
||||
#endif
|
||||
settings.board_profile = nvs_boot;
|
||||
@@ -145,7 +145,7 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
||||
|
||||
// still don't have a valid board profile. Let's see if we can determine one
|
||||
if (settings.board_profile == "default") {
|
||||
#ifdef EMSESP_DEBUG
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().debug("Trying to detect board and set board profile...");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ void WebStatusService::systemStatus(AsyncWebServerRequest * request) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef EMSESP_DEBUG
|
||||
#if defined(EMSESP_DEBUG)
|
||||
#ifdef EMSESP_TEST
|
||||
root["build_flags"] = "DEBUG,TEST";
|
||||
#else
|
||||
@@ -155,7 +155,7 @@ void WebStatusService::checkUpgrade(AsyncWebServerRequest * request, JsonVariant
|
||||
const std::string latest_version = json["version"] | EMSESP_APP_VERSION;
|
||||
version::Semver200_version this_version(latest_version);
|
||||
|
||||
#ifdef EMSESP_DEBUG
|
||||
#if defined(EMSESP_DEBUG)
|
||||
emsesp::EMSESP::logger().debug("Checking for upgrade: %s > %s", EMSESP_APP_VERSION, latest_version.c_str());
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user