fix
This commit is contained in:
parent
a1e3984dfb
commit
13adfda0be
|
@ -22,6 +22,7 @@ namespace ratgdo {
|
||||||
|
|
||||||
static const char* const TAG = "ratgdo";
|
static const char* const TAG = "ratgdo";
|
||||||
static const int STARTUP_DELAY = 2000; // delay before enabling interrupts
|
static const int STARTUP_DELAY = 2000; // delay before enabling interrupts
|
||||||
|
static const uint64_t REMOTE_ID = 0x539;
|
||||||
|
|
||||||
void IRAM_ATTR HOT RATGDOStore::isrObstruction(RATGDOStore* arg)
|
void IRAM_ATTR HOT RATGDOStore::isrObstruction(RATGDOStore* arg)
|
||||||
{
|
{
|
||||||
|
@ -132,23 +133,13 @@ namespace ratgdo {
|
||||||
|
|
||||||
void RATGDOComponent::getRollingCode(cmd command)
|
void RATGDOComponent::getRollingCode(cmd command)
|
||||||
{
|
{
|
||||||
|
uint64_t fixed = command.fixed | REMOTE_ID;
|
||||||
uint64_t id = 0x539;
|
|
||||||
uint64_t fixed = command.fixed;
|
|
||||||
uint32_t data = command.data;
|
|
||||||
|
|
||||||
ESP_LOGD(TAG, "Command: %d rollingCodeCounter=%d", command, this->rollingCodeCounter);
|
ESP_LOGD(TAG, "Command: %d rollingCodeCounter=%d", command, this->rollingCodeCounter);
|
||||||
|
encode_wireline(this->rollingCodeCounter, fixed, command.data, this->txRollingCode);
|
||||||
fixed = fixed | id;
|
|
||||||
|
|
||||||
encode_wireline(this->rollingCodeCounter, fixed, data, this->txRollingCode);
|
|
||||||
|
|
||||||
printRollingCode();
|
printRollingCode();
|
||||||
|
|
||||||
if (command != Command.DOOR1) { // door2 is created with same counter and should always be called after door1
|
if (command != Command.DOOR1) { // door2 is created with same counter and should always be called after door1
|
||||||
incrementRollingCodeCounter();
|
incrementRollingCodeCounter();
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOComponent::setRollingCodeCounter(uint32_t counter)
|
void RATGDOComponent::setRollingCodeCounter(uint32_t counter)
|
||||||
|
|
Loading…
Reference in New Issue