Trying again with a bunch of fixes from the compiler

This commit is contained in:
Jordan Zucker 2024-11-18 10:20:49 -08:00
parent 6182861297
commit fde61f2a2a
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
namespace esphome { namespace esphome {
namespace vornado_ir { 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 ..."); } void VornadoIR::setup() { ESP_LOGCONFIG(TAG, "Setting up VornadoIR ..."); }
@ -34,11 +34,11 @@ void VornadoIR::send_decrease() {
this->transmit_(VORNADO_IR_DECREASE_TIMINGS); 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"); ESP_LOGD(TAG, "Sending ir_code");
auto transmit = this->transmitter_->transmit(); auto transmit = this->transmitter_->transmit();
ESP_LOGD(TAG, "Sending ir_code got transmitter"); 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_data(ir_code);
data->set_carrier_frequency(38000); data->set_carrier_frequency(38000);
transmit.set_send_times(3); transmit.set_send_times(3);

View file

@ -17,7 +17,7 @@ class VornadoIR : public Component, public remote_base::RemoteTransmittable {
void loop() override; void loop() override;
void dump_config() override; void dump_config() override;
// general functions // general functions
void transmit_(RawTimings ir_code); void transmit_(const RawTimings &ir_code);
// direct actions // direct actions
void send_power_toggle(); void send_power_toggle();
void send_change_direction(); void send_change_direction();