From 411e1a40d89ea358543fde3cbdd13c1c857403b4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 16:37:34 -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 5293b9c..3987798 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 (arg->store_.obstructionLowCount >= 3 && arg->store_.obstructionLowCount <= 8) { + if (this->store_.obstructionLowCount >= 3 && this->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 - arg->store_.lastObstructionHigh > 70) { + if (this->input_obst_pin_->digital_read() && currentMillis - this->store_.lastObstructionHigh > 70) { obstructionDetected(); } else { // asleep