From fa336f60e310df725bb2680afe81d1da90d2c3c5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 17:15:49 -0500 Subject: [PATCH] Revert "fix" This reverts commit c22ab99931e5bbebcdff41ccf132e46ffe54f1da. --- components/ratgdo/ratgdo.cpp | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 563111c..fd3542c 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -253,33 +253,11 @@ namespace ratgdo { void RATGDOComponent::printRollingCode() { - - char code[CODE_LENGTH]; - snprintf(code, sizeof(code), - "%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X%01X", - this->rollingCode[0], - this->rollingCode[1], - this->rollingCode[2], - this->rollingCode[3], - this->rollingCode[4], - this->rollingCode[5], - this->rollingCode[6], - this->rollingCode[7], - this->rollingCode[8], - this->rollingCode[9], - this->rollingCode[10], - this->rollingCode[11], - this->rollingCode[12], - this->rollingCode[13], - this->rollingCode[14], - this->rollingCode[15], - this->rollingCode[16], - this->rollingCode[17], - this->rollingCode[18] - ); - - ESP_LOGD(TAG, "Rolling Code: %s", code); - + for (int i = 0; i < CODE_LENGTH; i++) { + if (this->rollingCode[i] <= 0x0f) + ESP_LOGD(TAG, "0"); + ESP_LOGD(TAG, "%x", this->rollingCode[i]); + } } void RATGDOComponent::set_rolling_codes(bool useRollingCodes)