From 74206e9c63ad7c6be303df66fc99e15058071a31 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 09:47:27 -0500 Subject: [PATCH] get rid of strings --- components/ratgdo/ratgdo.cpp | 2 +- components/ratgdo/ratgdo.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 145f368..fb39c42 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -639,7 +639,7 @@ namespace ratgdo { this->pref_.save(&this->rollingCodeCounter); } - void RATGDOComponent::register_child(RATGDOComponent* obj) + void RATGDOComponent::register_child(RATGDOClient* obj) { this->children_.push_back(obj); obj->set_parent(this); diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index 8776dc0..cdc2b80 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -27,6 +27,9 @@ extern "C" { namespace esphome { namespace ratgdo { + // Forward declare RATGDOClient + class RATGDOClient; + /// Enum for all states a the door can be in. enum DoorState : uint8_t { DOOR_STATE_UNKNOWN = 0, @@ -161,7 +164,7 @@ namespace ratgdo { void readRollingCode(uint8_t& door, uint8_t& light, uint8_t& lock, uint8_t& motion, uint8_t& obstruction); void sendCommand(Commands command); /** Register a child component. */ - void register_child(RATGDOComponent* obj); + void register_child(RATGDOClient* obj); protected: ESPPreferenceObject pref_;