From 160ba51041578abea650b588a1b3ed94c765e809 Mon Sep 17 00:00:00 2001 From: Michael Doppler <76885460+mdop@users.noreply.github.com> Date: Sat, 4 May 2024 08:16:06 +0000 Subject: [PATCH] Const a pointer argument --- esphome/components/mcp3428/mcp3428.cpp | 2 +- esphome/components/mcp3428/mcp3428.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/mcp3428/mcp3428.cpp b/esphome/components/mcp3428/mcp3428.cpp index bc9e4b8ee2..b202c01d46 100644 --- a/esphome/components/mcp3428/mcp3428.cpp +++ b/esphome/components/mcp3428/mcp3428.cpp @@ -130,7 +130,7 @@ bool MCP3428Component::poll_result(float &voltage) { } } -float MCP3428Component::convert_anwser_to_voltage_(uint8_t *anwser) { +float MCP3428Component::convert_anwser_to_voltage_(uint8_t const *anwser) { uint8_t config_resolution = (this->prev_config_ >> 2) & 0b00000011; uint8_t config_gain = this->prev_config_ & 0b00000011; diff --git a/esphome/components/mcp3428/mcp3428.h b/esphome/components/mcp3428/mcp3428.h index bce300eed9..b5e7cfded5 100644 --- a/esphome/components/mcp3428/mcp3428.h +++ b/esphome/components/mcp3428/mcp3428.h @@ -50,7 +50,7 @@ class MCP3428Component : public Component, public i2c::I2CDevice { void abandon_current_measurement() { single_measurement_active_ = false; } protected: - float convert_anwser_to_voltage_(uint8_t *anwser); + float convert_anwser_to_voltage_(uint8_t const *anwser); uint8_t prev_config_{0}; uint32_t last_config_write_ms_{0};