From cb65d0ed6b046c2fad7721ce3a52ddac83fc8d4b Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sun, 17 Mar 2019 19:22:58 +0100 Subject: [PATCH] configmanager: bitwise display of payloadmask --- include/configmanager.h | 4 ++++ src/configmanager.cpp | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/configmanager.h b/include/configmanager.h index 96e24e21..afd9c111 100644 --- a/include/configmanager.h +++ b/include/configmanager.h @@ -1,6 +1,10 @@ #ifndef _CONFIGMANAGER_H #define _CONFIGMANAGER_H +#include +#include +#include + void eraseConfig(void); void saveConfig(void); void loadConfig(void); diff --git a/src/configmanager.cpp b/src/configmanager.cpp index 583377a8..f2314789 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -1,8 +1,6 @@ /* configmanager persists runtime configuration using NVRAM of ESP32*/ #include "globals.h" -#include -#include // Local logging tag static const char TAG[] = "flash"; @@ -335,7 +333,7 @@ void loadConfig() { cfg.payloadmask = flash8; ESP_LOGI(TAG, "payloadmask = %d", flash8); } else { - ESP_LOGI(TAG, "payloadmask set to default %d", cfg.payloadmask); + ESP_LOGI(TAG, "payloadmask set to default %d", std::bitset<8>(cfg.payloadmask)); saveConfig(); }