mirror of
https://github.com/ratgdo/esphome-ratgdo.git
synced 2025-02-13 05:30:07 +00:00
log pins
This commit is contained in:
parent
e1c5b5adb6
commit
c6d8af3dad
@ -138,7 +138,7 @@ namespace ratgdo {
|
|||||||
|
|
||||||
void RATGDOComponent::loop()
|
void RATGDOComponent::loop()
|
||||||
{
|
{
|
||||||
//ESP_LOGD(TAG, "loop rollingCodeCounter: %d", this->rollingCodeCounter);
|
// ESP_LOGD(TAG, "loop rollingCodeCounter: %d", this->rollingCodeCounter);
|
||||||
obstructionLoop();
|
obstructionLoop();
|
||||||
gdoStateLoop();
|
gdoStateLoop();
|
||||||
dryContactLoop();
|
dryContactLoop();
|
||||||
@ -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
|
||||||
@ -317,7 +332,7 @@ namespace ratgdo {
|
|||||||
void RATGDOComponent::gdoStateLoop()
|
void RATGDOComponent::gdoStateLoop()
|
||||||
{
|
{
|
||||||
if (!this->available()) {
|
if (!this->available()) {
|
||||||
//ESP_LOGD(TAG, "No data available input:%d output:%d", this->input_gdo_pin_->get_pin(), this->output_gdo_pin_->get_pin());
|
// ESP_LOGD(TAG, "No data available input:%d output:%d", this->input_gdo_pin_->get_pin(), this->output_gdo_pin_->get_pin());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint8_t serData;
|
uint8_t serData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user