From 37ff1a74f94fc0c976b5c0567cc5373ac6ff4b28 Mon Sep 17 00:00:00 2001 From: Patrick Moessler Date: Sat, 20 Jan 2024 22:04:34 +0100 Subject: [PATCH] remove invalid delays --- components/spi_74hc595_display/spi_74hc595_display.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/spi_74hc595_display/spi_74hc595_display.cpp b/components/spi_74hc595_display/spi_74hc595_display.cpp index e2c163f..6a790a2 100644 --- a/components/spi_74hc595_display/spi_74hc595_display.cpp +++ b/components/spi_74hc595_display/spi_74hc595_display.cpp @@ -127,7 +127,7 @@ void SPI_74HC595_DISPLAYComponent::dump_config() { } void SPI_74HC595_DISPLAYComponent::display() { - uint32_t delay = static_cast(this->get_update_interval())*1000 / 9; + uint32_t delay = static_cast(this->get_update_interval())*1000 / 8; for (uint8_t i = 0; i < 8; i++) { this->enable(); for (uint8_t j = 0; j < this->num_chips_; j++) { @@ -140,7 +140,6 @@ void SPI_74HC595_DISPLAYComponent::display() { this->disable(); delay_microseconds_safe(delay); } - delay_microseconds_safe(delay); // zero out everything to have a somewhat uniform duty cycle for all digits this->enable(); for (uint8_t j = 0; j < this->num_chips_; j++) { @@ -150,7 +149,6 @@ void SPI_74HC595_DISPLAYComponent::display() { this->send_byte_(0, 0); } } - delay_microseconds_safe(delay); this->disable(); }