Compare commits

...

2 Commits

Author SHA1 Message Date
J. Nick Koston
d59e323152 remove manual zero init 2026-01-23 21:52:10 -10:00
J. Nick Koston
b23f1b203f [tm1638] Use member array instead of heap allocation for display buffer 2026-01-23 21:31:32 -10:00
2 changed files with 1 additions and 4 deletions

View File

@@ -35,9 +35,6 @@ void TM1638Component::setup() {
this->set_intensity(intensity_);
this->reset_(); // all LEDs off
for (uint8_t i = 0; i < 8; i++) // zero fill print buffer
this->buffer_[i] = 0;
}
void TM1638Component::dump_config() {

View File

@@ -70,7 +70,7 @@ class TM1638Component : public PollingComponent {
GPIOPin *clk_pin_;
GPIOPin *stb_pin_;
GPIOPin *dio_pin_;
uint8_t *buffer_ = new uint8_t[8];
uint8_t buffer_[8]{};
tm1638_writer_t writer_{};
std::vector<KeyListener *> listeners_{};
};