This commit is contained in:
J. Nick Koston 2023-06-07 20:40:38 -05:00
parent 1d8fdd73f4
commit ad7a45288c
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -186,8 +186,8 @@ namespace ratgdo {
motion = 0; // when the status message is read, reset motion state to 0|clear motion = 0; // when the status message is read, reset motion state to 0|clear
// obstruction = (byte1 >> 6) & 1; // unreliable due to the time it takes to register an obstruction // obstruction = (byte1 >> 6) & 1; // unreliable due to the time it takes to register an obstruction
ESP_LOGD(TAG, "Door: %d Light: %d Lock: %d Motion: %d Obstruction: %d", door, light, lock, motion, obstruction); ESP_LOGD(TAG, "Door: %d Light: %d Lock: %d Motion: %d Obstruction: %d", door, light, lock, motion, obstruction);
if (this->forceUpdate) { if (this->forceUpdate_) {
this->forceUpdate = false; this->forceUpdate_ = false;
this->previousDoorState = DoorState::DOOR_STATE_UNKNOWN; this->previousDoorState = DoorState::DOOR_STATE_UNKNOWN;
this->previousLightState = LightState::LIGHT_STATE_UNKNOWN; this->previousLightState = LightState::LIGHT_STATE_UNKNOWN;
this->previousLockState = LockState::LOCK_STATE_UNKNOWN; this->previousLockState = LockState::LOCK_STATE_UNKNOWN;
@ -456,7 +456,7 @@ namespace ratgdo {
void RATGDOComponent::query() void RATGDOComponent::query()
{ {
this->forceUpdate = true; this->forceUpdate_ = true;
sendCommandAndSaveCounter(Commands::REBOOT2); sendCommandAndSaveCounter(Commands::REBOOT2);
} }

View File

@ -141,6 +141,7 @@ namespace ratgdo {
protected: protected:
ESPPreferenceObject pref_; ESPPreferenceObject pref_;
std::vector<RATGDOClient*> children_; std::vector<RATGDOClient*> children_;
bool forceUpdate_ { false };
RATGDOStore store_ {}; RATGDOStore store_ {};
InternalGPIOPin* output_gdo_pin_; InternalGPIOPin* output_gdo_pin_;