From 99a0fcdbbd42d73149a350b3d752728160ac3510 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 19:20:54 -0500 Subject: [PATCH] tidy up --- 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 7f14abd..d001a14 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -349,13 +349,13 @@ namespace ratgdo { // check to see if we got between 3 and 8 low pulses on the line if (this->store_.obstructionLowCount >= 3 && this->store_.obstructionLowCount <= 8) { // obstructionCleared(); - this->store_.obstructionState = ObstructionState::OBSTRUCTION_STATE_CLEAR; + this->obstructionState = ObstructionState::OBSTRUCTION_STATE_CLEAR; // if there have been no pulses the line is steady high or low } else if (this->store_.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->store_.lastObstructionHigh > 70) { - this->store_.obstructionState = ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED; + this->obstructionState = ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED; // obstructionDetected(); } else { // asleep