Revert "fix"

This reverts commit af71b36eb4.
This commit is contained in:
J. Nick Koston 2023-06-05 20:05:37 -05:00
parent af71b36eb4
commit a6125240b0
No known key found for this signature in database
2 changed files with 9 additions and 9 deletions

View File

@ -13,6 +13,8 @@
#include "ratgdo.h" #include "ratgdo.h"
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include "esphome/components/uart/uart.h"
#include "esphome/core/component.h"
namespace esphome { namespace esphome {
namespace ratgdo { namespace ratgdo {
@ -90,14 +92,10 @@ namespace ratgdo {
} }
} }
class RATGDOComponent : public Component, public UARTDevice { class RATGDOComponent : public uart::UARTDevice, public Component {
public: public:
RATGDOComponent(UARTComponent* parent)
: UARTDevice(parent)
{
}
void setup() void setup() override
{ {
this->pref_ = global_preferences->make_preference<int>(734874333U); this->pref_ = global_preferences->make_preference<int>(734874333U);
if (!this->pref_.load(&this->rollingCodeCounter)) { if (!this->pref_.load(&this->rollingCodeCounter)) {
@ -144,7 +142,7 @@ namespace ratgdo {
// reboot/sync to the opener on startup // reboot/sync to the opener on startup
} }
void loop() void loop() override
{ {
ESP_LOGD(TAG, "loop rollingCodeCounter: %d", this->rollingCodeCounter); ESP_LOGD(TAG, "loop rollingCodeCounter: %d", this->rollingCodeCounter);
obstructionLoop(); obstructionLoop();

View File

@ -12,11 +12,12 @@
************************************/ ************************************/
#pragma once #pragma once
#include "esphome/components/uart/uart.h"
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/core/gpio.h" #include "esphome/core/gpio.h"
#include "esphome/core/log.h"
#include "esphome/core/preferences.h" #include "esphome/core/preferences.h"
#include "esphome/core/log.h"
#include "esphome/components/uart/uart.h"
#include "esphome/core/component.h"
#include "SoftwareSerial.h" #include "SoftwareSerial.h"
extern "C" { extern "C" {
@ -28,6 +29,7 @@ extern "C" {
namespace esphome { namespace esphome {
namespace ratgdo { namespace ratgdo {
struct RATGDOStore { struct RATGDOStore {
ISRInternalGPIOPin input_obst; ISRInternalGPIOPin input_obst;