fix
This commit is contained in:
parent
44f317b983
commit
3fddba95d4
|
@ -395,7 +395,7 @@ void RATGDOComponent::sync() {
|
||||||
transmit(this->rollingCode, CODE_LENGTH);
|
transmit(this->rollingCode, CODE_LENGTH);
|
||||||
delay(45);
|
delay(45);
|
||||||
|
|
||||||
writeCounterToFlash();
|
this->pref_.save(&this->rollingCodeCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::openDoor() {
|
void RATGDOComponent::openDoor() {
|
||||||
|
@ -417,7 +417,7 @@ void RATGDOComponent::openDoor() {
|
||||||
getRollingCode("door2");
|
getRollingCode("door2");
|
||||||
transmit(this->rollingCode, CODE_LENGTH);
|
transmit(this->rollingCode, CODE_LENGTH);
|
||||||
|
|
||||||
writeCounterToFlash();
|
this->pref_.save(&this->rollingCodeCounter);
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
ESP_LOGD(TAG, "sync_code[%d]", i);
|
ESP_LOGD(TAG, "sync_code[%d]", i);
|
||||||
|
|
Loading…
Reference in New Issue