1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

Optimize Component and Application state storage from uint32_t to uint8_t (#9082)

This commit is contained in:
J. Nick Koston
2025-06-14 21:48:53 -05:00
committed by GitHub
parent dcfe7af9d3
commit 374c33e8dc
9 changed files with 65 additions and 36 deletions

View File

@@ -332,7 +332,7 @@ class Application {
*/
void teardown_components(uint32_t timeout_ms);
uint32_t get_app_state() const { return this->app_state_; }
uint8_t get_app_state() const { return this->app_state_; }
#ifdef USE_BINARY_SENSOR
const std::vector<binary_sensor::BinarySensor *> &get_binary_sensors() { return this->binary_sensors_; }
@@ -653,7 +653,7 @@ class Application {
uint32_t last_loop_{0};
uint32_t loop_interval_{16};
size_t dump_config_at_{SIZE_MAX};
uint32_t app_state_{0};
uint8_t app_state_{0};
Component *current_component_{nullptr};
uint32_t loop_component_start_time_{0};