diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 3a27d8e..51f48b7 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -90,9 +90,7 @@ namespace ratgdo { } this->output_gdo_pin_->setup(); - this->store_.output_gdo = this->output_gdo_pin_->to_isr(); this->input_gdo_pin_->setup(); - this->store_.input_gdo = this->input_gdo_pin_->to_isr(); this->input_obst_pin_->setup(); this->store_.input_obst = this->input_obst_pin_->to_isr(); diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index 389e8d3..04d4248 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -29,25 +29,19 @@ namespace ratgdo { class RATGDOComponent; struct RATGDOStore { - ISRInternalGPIOPin output_gdo; - - ISRInternalGPIOPin input_gdo; ISRInternalGPIOPin input_obst; ISRInternalGPIOPin trigger_open; ISRInternalGPIOPin trigger_close; ISRInternalGPIOPin trigger_light; - ISRInternalGPIOPin status_door; - ISRInternalGPIOPin status_obst; - unsigned long lastOpenDoorTime { 0 }; unsigned long lastCloseDoorTime { 0 }; unsigned long lastToggleLightTime { 0 }; - unsigned long lastPulse { 0 }; - volatile int doorPositionCounter { 0 }; // calculate the door's movement and position - bool rpm1Pulsed { false }; // did rpm1 get a pulse or not - eliminates an issue when the - // sensor is parked on a high pulse which fires rpm2 isr + + bool dryContactDoorOpen { false }; + bool dryContactDoorClose { false }; + bool dryContactToggleLight { false }; int obstructionLowCount = 0; // count obstruction low pulses long lastObstructionHigh = 0; // count time between high pulses from the obst ISR @@ -58,10 +52,6 @@ namespace ratgdo { uint8_t lightState = 2; uint8_t doorState = 0; - bool dryContactDoorOpen { false }; - bool dryContactDoorClose { false }; - bool dryContactToggleLight { false }; - static void IRAM_ATTR isrDoorOpen(RATGDOStore* arg); static void IRAM_ATTR isrDoorClose(RATGDOStore* arg); static void IRAM_ATTR isrLight(RATGDOStore* arg);