From c783dbd6809f8c3b6cf318752bdba85a89cfc365 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 16:37:14 -0500 Subject: [PATCH] fix --- components/ratgdo/ratgdo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index d0dc210..5293b9c 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -378,14 +378,14 @@ namespace ratgdo { // Every 50ms if (currentMillis - lastMillis > 50) { // check to see if we got between 3 and 8 low pulses on the line - if (this->obstructionLowCount >= 3 && this->obstructionLowCount <= 8) { + if (arg->store_.obstructionLowCount >= 3 && arg->store_.obstructionLowCount <= 8) { obstructionCleared(); // if there have been no pulses the line is steady high or low } else if (this->obstructionLowCount == 0) { // if the line is high and the last high pulse was more than 70ms ago, // then there is an obstruction present - if (this->input_obst_pin_->digital_read() && currentMillis - this->lastObstructionHigh > 70) { + if (this->input_obst_pin_->digital_read() && currentMillis - arg->store_.lastObstructionHigh > 70) { obstructionDetected(); } else { // asleep