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

Reduce LightCall memory usage by 50 bytes per call (#9333)

This commit is contained in:
J. Nick Koston
2025-07-07 15:20:40 -05:00
committed by GitHub
parent 3ef392d433
commit 31f36df4ba
9 changed files with 522 additions and 263 deletions

View File

@@ -59,9 +59,9 @@ class LightTransitionTransformer : public LightTransformer {
// transition from 0 to 1 on x = [0, 1]
static float smoothed_progress(float x) { return x * x * x * (x * (x * 6.0f - 15.0f) + 10.0f); }
bool changing_color_mode_{false};
LightColorValues end_values_{};
LightColorValues intermediate_values_{};
bool changing_color_mode_{false};
};
class LightFlashTransformer : public LightTransformer {
@@ -117,8 +117,8 @@ class LightFlashTransformer : public LightTransformer {
protected:
LightState &state_;
uint32_t transition_length_;
std::unique_ptr<LightTransformer> transformer_{nullptr};
uint32_t transition_length_;
bool begun_lightstate_restore_;
};