This commit is contained in:
J. Nick Koston 2023-06-05 19:21:59 -05:00
parent 664fb1ce8f
commit 0f81c21983
No known key found for this signature in database
1 changed files with 6 additions and 7 deletions

View File

@ -471,12 +471,9 @@ namespace ratgdo {
{ {
getRollingCode("door1"); getRollingCode("door1");
transmit(this->txRollingCode); transmit(this->txRollingCode);
delay(40); delay(40);
getRollingCode("door2"); getRollingCode("door2");
transmit(this->txRollingCode); transmit(this->txRollingCode);
this->pref_.save(&this->rollingCodeCounter); this->pref_.save(&this->rollingCodeCounter);
} }
@ -498,9 +495,7 @@ namespace ratgdo {
} }
void RATGDOComponent::toggleLight(){ void RATGDOComponent::toggleLight(){
getRollingCode("light"); sendCommand("light");
transmit(this->txRollingCode);
this->pref_.save(&this->rollingCodeCounter);
} }
// Lock functions // Lock functions
@ -521,7 +516,11 @@ namespace ratgdo {
} }
void RATGDOComponent::toggleLock(){ void RATGDOComponent::toggleLock(){
getRollingCode("lock"); sendCommand("lock");
}
void RATGDOComponent::sendCommand(const char* command){
getRollingCode(command);
transmit(this->txRollingCode); transmit(this->txRollingCode);
this->pref_.save(&this->rollingCodeCounter); this->pref_.save(&this->rollingCodeCounter);
} }