From 6d87e2c74d5a832b753c1eb57fe9be9f79a7107e Mon Sep 17 00:00:00 2001 From: paulchilton Date: Sun, 1 Jan 2023 10:00:49 +0000 Subject: [PATCH] Changed brightness log so it only logs when the value is changed --- components/axp192/axp192.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/axp192/axp192.cpp b/components/axp192/axp192.cpp index 7e60609..dc745ea 100644 --- a/components/axp192/axp192.cpp +++ b/components/axp192/axp192.cpp @@ -205,11 +205,12 @@ void AXP192Component::ReadBuff( uint8_t Addr , uint8_t Size , uint8_t *Buff ) void AXP192Component::UpdateBrightness() { - ESP_LOGD(TAG, "Brightness=%f (Curr: %f)", brightness_, curr_brightness_); if (brightness_ == curr_brightness_) { return; } + + ESP_LOGD(TAG, "Brightness=%f (Curr: %f)", brightness_, curr_brightness_); curr_brightness_ = brightness_; const uint8_t c_min = 7;