From fde61f2a2ae6f2577a374e7c9f2d42be76b1c9cd Mon Sep 17 00:00:00 2001 From: Jordan Zucker Date: Mon, 18 Nov 2024 10:20:49 -0800 Subject: [PATCH] Trying again with a bunch of fixes from the compiler --- esphome/components/vornado_ir/vornado_ir.cpp | 6 +++--- esphome/components/vornado_ir/vornado_ir.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/vornado_ir/vornado_ir.cpp b/esphome/components/vornado_ir/vornado_ir.cpp index fffeb1a097..11f2525983 100644 --- a/esphome/components/vornado_ir/vornado_ir.cpp +++ b/esphome/components/vornado_ir/vornado_ir.cpp @@ -6,7 +6,7 @@ namespace esphome { namespace vornado_ir { -static const char *TAG = "vornado_ir"; +static const char *const TAG = "vornado_ir"; void VornadoIR::setup() { ESP_LOGCONFIG(TAG, "Setting up VornadoIR ..."); } @@ -34,11 +34,11 @@ void VornadoIR::send_decrease() { this->transmit_(VORNADO_IR_DECREASE_TIMINGS); } -void VornadoIR::transmit_(RawTimings ir_code) { +void VornadoIR::transmit_(const RawTimings &ir_code) { ESP_LOGD(TAG, "Sending ir_code"); auto transmit = this->transmitter_->transmit(); ESP_LOGD(TAG, "Sending ir_code got transmitter"); - auto data = transmit.get_data(); + auto *data = transmit.get_data(); data->set_data(ir_code); data->set_carrier_frequency(38000); transmit.set_send_times(3); diff --git a/esphome/components/vornado_ir/vornado_ir.h b/esphome/components/vornado_ir/vornado_ir.h index 460ac37d9a..68b063b4d1 100644 --- a/esphome/components/vornado_ir/vornado_ir.h +++ b/esphome/components/vornado_ir/vornado_ir.h @@ -17,7 +17,7 @@ class VornadoIR : public Component, public remote_base::RemoteTransmittable { void loop() override; void dump_config() override; // general functions - void transmit_(RawTimings ir_code); + void transmit_(const RawTimings &ir_code); // direct actions void send_power_toggle(); void send_change_direction();