This commit is contained in:
J. Nick Koston 2023-06-05 21:54:17 -05:00
parent e1c5b5adb6
commit c6d8af3dad
No known key found for this signature in database

View File

@ -249,11 +249,26 @@ namespace ratgdo {
void RATGDOComponent::printRollingCode() void RATGDOComponent::printRollingCode()
{ {
for (int i = 0; i < CODE_LENGTH; i++) { ESP_LOGD(TAG, "Send code: %x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x",
if (this->txRollingCode[i] <= 0x0f) this->txRollingCode[0] <= 0x0f ? 0 : this->txRollingCode[0],
ESP_LOGD(TAG, "0"); this->txRollingCode[1] <= 0x0f ? 0 : this->txRollingCode[1],
ESP_LOGD(TAG, "%x", this->txRollingCode[i]); this->txRollingCode[2] <= 0x0f ? 0 : this->txRollingCode[2],
} this->txRollingCode[3] <= 0x0f ? 0 : this->txRollingCode[3],
this->txRollingCode[4] <= 0x0f ? 0 : this->txRollingCode[4],
this->txRollingCode[5] <= 0x0f ? 0 : this->txRollingCode[5],
this->txRollingCode[6] <= 0x0f ? 0 : this->txRollingCode[6],
this->txRollingCode[7] <= 0x0f ? 0 : this->txRollingCode[7],
this->txRollingCode[8] <= 0x0f ? 0 : this->txRollingCode[8],
this->txRollingCode[9] <= 0x0f ? 0 : this->txRollingCode[9],
this->txRollingCode[10] <= 0x0f ? 0 : this->txRollingCode[10],
this->txRollingCode[11] <= 0x0f ? 0 : this->txRollingCode[11],
this->txRollingCode[12] <= 0x0f ? 0 : this->txRollingCode[12],
this->txRollingCode[13] <= 0x0f ? 0 : this->txRollingCode[13],
this->txRollingCode[14] <= 0x0f ? 0 : this->txRollingCode[14],
this->txRollingCode[15] <= 0x0f ? 0 : this->txRollingCode[15],
this->txRollingCode[16] <= 0x0f ? 0 : this->txRollingCode[16],
this->txRollingCode[17] <= 0x0f ? 0 : this->txRollingCode[17],
this->txRollingCode[18] <= 0x0f ? 0 : this->txRollingCode[18]);
} }
// handle changes to the dry contact state // handle changes to the dry contact state