Update the patched UART component to ESPHome 2026.11.0
ESPHome 2026.11's tuya component calls uart.new_uart_component(), which the 2026.10.2 copy didn't have, so the build failed. Copy the UART component from 2026.11.0, reapply the PA13/PA14 patch, regenerate the patch file and point the refs at v1.0.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bcc6b3a42b
commit
1457e25d98
39 files changed
+907
-304
No files matched your search
@@ -4,7 +4,11 @@
|
||||
|
||||
namespace esphome::uart {
|
||||
|
||||
static const char *const TAG = "uart_transport";
|
||||
ESPHOME_LOG_TAG(TAG, "uart_transport");
|
||||
|
||||
static constexpr uint16_t MAX_PACKET_SIZE = 508;
|
||||
static constexpr uint8_t FLAG_BYTE = 0x7E;
|
||||
static constexpr uint8_t CONTROL_BYTE = 0x7D;
|
||||
|
||||
void UARTTransport::loop() {
|
||||
PacketTransport::loop();
|
||||
@@ -78,4 +82,5 @@ void UARTTransport::send_packet(const std::vector<uint8_t> &buf) const {
|
||||
this->parent_->write_byte(FLAG_BYTE);
|
||||
}
|
||||
|
||||
size_t UARTTransport::get_max_packet_size() { return MAX_PACKET_SIZE; }
|
||||
} // namespace esphome::uart
|
||||
@@ -16,9 +16,6 @@ namespace esphome::uart {
|
||||
* Any occurrence of FLAG_BYTE or CONTROL_BYTE in the data is escaped by emitting CONTROL_BYTE followed by the byte
|
||||
* XORed with 0x20.
|
||||
*/
|
||||
static const uint16_t MAX_PACKET_SIZE = 508;
|
||||
static const uint8_t FLAG_BYTE = 0x7E;
|
||||
static const uint8_t CONTROL_BYTE = 0x7D;
|
||||
|
||||
class UARTTransport final : public packet_transport::PacketTransport, public UARTDevice {
|
||||
public:
|
||||
@@ -29,7 +26,7 @@ class UARTTransport final : public packet_transport::PacketTransport, public UAR
|
||||
void write_byte_(uint8_t byte) const;
|
||||
void send_packet(const std::vector<uint8_t> &buf) const override;
|
||||
bool should_send() override { return true; };
|
||||
size_t get_max_packet_size() override { return MAX_PACKET_SIZE; }
|
||||
size_t get_max_packet_size() override;
|
||||
std::vector<uint8_t> receive_buffer_{};
|
||||
bool rx_started_{};
|
||||
bool rx_control_{};
|
||||
|
||||
Reference in new issue
Block a user