From f2067538c2427ea37925dee025a462f3f6caa493 Mon Sep 17 00:00:00 2001 From: klaudiusz223 Date: Fri, 26 Jan 2024 01:08:04 +0100 Subject: [PATCH] static const --- esphome/components/time_based_tilt/time_based_tilt_cover.cpp | 2 ++ esphome/components/time_based_tilt/time_based_tilt_cover.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/time_based_tilt/time_based_tilt_cover.cpp b/esphome/components/time_based_tilt/time_based_tilt_cover.cpp index d0ad8a92d6..6a0fe7c6fa 100644 --- a/esphome/components/time_based_tilt/time_based_tilt_cover.cpp +++ b/esphome/components/time_based_tilt/time_based_tilt_cover.cpp @@ -7,6 +7,8 @@ namespace time_based_tilt { static const char *const TAG = "time_based_tilt.cover"; +const float TimeBasedTiltCover::TARGET_NONE = -1; + using namespace esphome::cover; void TimeBasedTiltCover::dump_config() { diff --git a/esphome/components/time_based_tilt/time_based_tilt_cover.h b/esphome/components/time_based_tilt/time_based_tilt_cover.h index 75b6dc2e9e..137f93be77 100644 --- a/esphome/components/time_based_tilt/time_based_tilt_cover.h +++ b/esphome/components/time_based_tilt/time_based_tilt_cover.h @@ -50,7 +50,7 @@ class TimeBasedTiltCover : public cover::Cover, public Component { uint32_t inertia_open_time_; uint32_t inertia_close_time_; - const float TARGET_NONE{-1}; + const static float TARGET_NONE; enum State : uint8_t { STATE_IDLE, STATE_MOVING,