1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-08 03:40:28 +01:00

Apply suggestions from code review

This commit is contained in:
Jesse Hills 2024-05-10 11:57:30 +12:00 committed by GitHub
parent 12f6996422
commit e709b19dfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,9 @@
#ifdef USE_ESP32 #ifdef USE_ESP32
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include <esp_heap_caps.h>
#include <esp_system.h>
#if defined(USE_ESP32_VARIANT_ESP32) #if defined(USE_ESP32_VARIANT_ESP32)
#include <esp32/rom/rtc.h> #include <esp32/rom/rtc.h>
#elif defined(USE_ESP32_VARIANT_ESP32C3) #elif defined(USE_ESP32_VARIANT_ESP32C3)

View File

@ -76,6 +76,7 @@ void DebugComponent::get_device_info_(std::string &device_info) {
void DebugComponent::update_platform_() { void DebugComponent::update_platform_() {
#ifdef USE_SENSOR #ifdef USE_SENSOR
if (this->block_sensor_ != nullptr) { if (this->block_sensor_ != nullptr) {
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
this->block_sensor_->publish_state(ESP.getMaxFreeBlockSize()); this->block_sensor_->publish_state(ESP.getMaxFreeBlockSize());
} }
#if USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 5, 2) #if USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 5, 2)