Skip to content

Commit

Permalink
Send raw command
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Sep 18, 2024
1 parent 21c7366 commit a714003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions components/tc_bus/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ namespace esphome
command |= (address & 0xFF); // 0
break;

case COMMAND_TYPE_PROGRAMMING_MODE:
command |= (5 << 12); // 5
command |= 0x0040; // 04
command |= (address & 0x01); // 0/1
break;

default:
break;
}
Expand Down Expand Up @@ -288,6 +282,7 @@ namespace esphome
case COMMAND_TYPE_SEARCH_DEVICES: return "SEARCH_DEVICES";
case COMMAND_TYPE_FOUND_DEVICE: return "FOUND_DEVICE";
case COMMAND_TYPE_FOUND_DEVICE_SUBSYSTEM: return "FOUND_DEVICE_SUBSYSTEM";
case COMMAND_TYPE_PROGRAMMING_MODE: return "PROGRAMMING_MODE";
default: return "UNKNOWN";
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ namespace esphome

void TCBusComponent::set_programming_mode(bool enabled)
{
this->programming_mode_ = enabled;
send_command_generate(COMMAND_TYPE_PROGRAMMING_MODE, enabled ? 1 : 0, 0);
ESP_LOGD(TAG, "Programming Mode active: %s", YESNO(enabled));
send_command(enabled ? 0x5041 : 0x5040);
}

} // namespace tc_bus
Expand Down

0 comments on commit a714003

Please sign in to comment.