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

View File

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