This commit is contained in:
J. Nick Koston 2023-06-05 17:32:04 -05:00
parent d97d754f40
commit e15cb7a0e3
No known key found for this signature in database
1 changed files with 7 additions and 16 deletions

View File

@ -498,21 +498,7 @@ namespace ratgdo {
// opening/closing. by setting here, we can avoid
// bouncing from rapidly repeated commands
if (this->useRollingCodes_) {
getRollingCode("door1");
transmit(this->rollingCode);
delay(40);
getRollingCode("door2");
transmit(this->rollingCode);
this->pref_.save(&this->rollingCodeCounter);
} else {
sendSyncCodes();
ESP_LOGD(TAG, "door_code");
transmit(DOOR_CODE);
}
toggleDoor();
}
void RATGDOComponent::closeDoor()
@ -526,6 +512,11 @@ namespace ratgdo {
// opening/closing. by setting here, we can avoid
// bouncing from rapidly repeated commands
toggleDoor();
}
void RATGDOComponent::toggleDoor()
{
if (this->useRollingCodes_) {
getRollingCode("door1");
transmit(this->rollingCode);
@ -540,7 +531,7 @@ namespace ratgdo {
sendSyncCodes();
ESP_LOGD(TAG, "door_code");
transmit(DOOR_CODE);
}
}
}
void RATGDOComponent::toggleLight()