diff --git a/include/devices.h b/include/devices.h index 3d0a1d0..10f28eb 100644 --- a/include/devices.h +++ b/include/devices.h @@ -39,7 +39,7 @@ namespace Devices { [](const char* msg) { Display::brightness = String{ msg }.toInt(); } - }).withMin(Display::Brightness::MIN).withMax(Display::Brightness::MAX).withStep(Display::Brightness::STEP).restoreStateFromCommand().build(); + }).withMin(Display::Brightness::MIN).withMax(Display::Brightness::MAX).withStep(1).restoreStateFromCommand().build(); auto hourFormatMqtt = Builder::instance(new Switch{ "Format 24h", "format_24h", [](const char* msg) { diff --git a/include/display.h b/include/display.h index b2b5c2c..cfbccf8 100644 --- a/include/display.h +++ b/include/display.h @@ -60,7 +60,6 @@ namespace Display { struct Brightness { static constexpr uint8 MIN = 0; static constexpr uint8 MAX = 15; - static constexpr uint8 STEP = 1; static constexpr uint8 DAY = 11; static constexpr uint8 NIGHT = MIN; void (*changedCallback)(); @@ -75,10 +74,6 @@ namespace Display { return current; } - void change(bool increase) { - increase ? *this = current + STEP : *this = current - STEP; - } - private: uint8 current = NIGHT; } brightness;