From 3b37318621214b6fe11d82de9a324be70bc98caa Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 09:51:22 -0500 Subject: [PATCH] get rid of strings --- components/ratgdo/ratgdo.cpp | 2 ++ components/ratgdo/ratgdo.h | 1 + components/ratgdo/ratgdo_child.h | 25 ++++++++++++------------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index fb39c42..8f1e992 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -12,6 +12,8 @@ ************************************/ #include "ratgdo.h" +#include "ratgdo_child.h" + #include "esphome/core/log.h" namespace esphome { diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index cdc2b80..20155d3 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -22,6 +22,7 @@ extern "C" { #include "secplus.h" } +#include "ratgdo_child.h" #define CODE_LENGTH 19 namespace esphome { diff --git a/components/ratgdo/ratgdo_child.h b/components/ratgdo/ratgdo_child.h index 74b4893..1cca735 100644 --- a/components/ratgdo/ratgdo_child.h +++ b/components/ratgdo/ratgdo_child.h @@ -5,19 +5,18 @@ namespace esphome { namespace ratgdo { -// Forward declare RATGDOComponent -class RATGDOComponent; + // Forward declare RATGDOComponent + class RATGDOComponent; -class RATGDOClient : public Parented { - public: - virtual void on_status() = 0; - virtual void on_ratgdo_state(bool is_ready) = 0; + class RATGDOClient : public Parented { + public: + virtual void on_status() = 0; + virtual void on_ratgdo_state(bool is_ready) = 0; - protected: - friend RATGDOComponent; - virtual std::string describe() = 0; -}; - -} // namespace ratgdo -} // namespace esphome + protected: + friend RATGDOComponent; + virtual std::string describe() = 0; + }; +} // namespace ratgdo +} // namespace esphome