mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
[packet_transport] Make some arguments const (#8700)
Co-authored-by: clydeps <U5yx99dok9>
This commit is contained in:
@@ -74,7 +74,7 @@ void UARTTransport::write_byte_(uint8_t byte) const {
|
||||
this->parent_->write_byte(byte);
|
||||
}
|
||||
|
||||
void UARTTransport::send_packet(std::vector<uint8_t> &buf) const {
|
||||
void UARTTransport::send_packet(const std::vector<uint8_t> &buf) const {
|
||||
this->parent_->write_byte(FLAG_BYTE);
|
||||
for (uint8_t byte : buf) {
|
||||
this->write_byte_(byte);
|
||||
|
||||
@@ -29,7 +29,7 @@ class UARTTransport : public packet_transport::PacketTransport, public UARTDevic
|
||||
|
||||
protected:
|
||||
void write_byte_(uint8_t byte) const;
|
||||
void send_packet(std::vector<uint8_t> &buf) const override;
|
||||
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; }
|
||||
std::vector<uint8_t> receive_buffer_{};
|
||||
|
||||
Reference in New Issue
Block a user