From bf8c828081b3d218a8dfb962953fb4692e184409 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Nov 2025 22:34:12 +0000 Subject: [PATCH] [bmi270] Fix naming and codeowners - Rename bmi270_config_file to BMI270_CONFIG_FILE (follow UPPER_SNAKE_CASE convention for constants) - Set CODEOWNERS to empty list for new component --- esphome/components/bmi270/__init__.py | 2 +- esphome/components/bmi270/bmi270.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/bmi270/__init__.py b/esphome/components/bmi270/__init__.py index f70ffa9520..5d68a0ffbe 100644 --- a/esphome/components/bmi270/__init__.py +++ b/esphome/components/bmi270/__init__.py @@ -1 +1 @@ -CODEOWNERS = ["@esphome/core"] +CODEOWNERS = [] diff --git a/esphome/components/bmi270/bmi270.cpp b/esphome/components/bmi270/bmi270.cpp index 3bba5b8039..ba3bea55b2 100644 --- a/esphome/components/bmi270/bmi270.cpp +++ b/esphome/components/bmi270/bmi270.cpp @@ -94,7 +94,7 @@ const float GRAVITY_EARTH = 9.80665f; // BMI270 configuration file (reduced version for basic operation) // This is a simplified config file - for full features, you would need the complete config from Bosch -static const uint8_t bmi270_config_file[] = { +static const uint8_t BMI270_CONFIG_FILE[] = { 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x3d, 0xb1, 0xc8, 0x2e, 0x00, 0x2e, 0xc8, 0x2e, 0x00, 0x2e, 0xc8, 0x2e, 0x00, 0x2e, 0xc8, 0x2e, 0x00, 0x2e, 0xc8, 0x2e, 0x00, 0x2e, 0xc8, 0x2e, 0x00, 0x2e, 0x90, 0x32, 0x21, 0x2e, 0x59, 0xf5, 0x10, 0x30, 0x21, 0x2e, 0x6a, 0xf5, 0x1a, 0x24, 0x22, 0x00, @@ -158,10 +158,10 @@ void BMI270Component::internal_setup_(SetupState state) { case SetupState::UPLOAD_CONFIG: { // Upload configuration file in chunks - ESP_LOGV(TAG, " Uploading config file (%d bytes)", sizeof(bmi270_config_file)); + ESP_LOGV(TAG, " Uploading config file (%d bytes)", sizeof(BMI270_CONFIG_FILE)); const size_t chunk_size = 16; - const size_t total_size = sizeof(bmi270_config_file); + const size_t total_size = sizeof(BMI270_CONFIG_FILE); for (size_t i = 0; i < total_size; i += chunk_size) { size_t bytes_to_write = (i + chunk_size > total_size) ? (total_size - i) : chunk_size; @@ -181,7 +181,7 @@ void BMI270Component::internal_setup_(SetupState state) { } // Write data chunk - if (!this->write_bytes(BMI270_REGISTER_INIT_DATA, &bmi270_config_file[i], bytes_to_write)) { + if (!this->write_bytes(BMI270_REGISTER_INIT_DATA, &BMI270_CONFIG_FILE[i], bytes_to_write)) { this->mark_failed("Failed to write config data"); return; }