1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

[remote_transmitter] fix sending codes on libretiny (#10959)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
Piotr Szulc
2025-10-01 13:10:37 +02:00
committed by GitHub
parent 848ba6b717
commit 4194a940ae

View File

@@ -40,7 +40,13 @@ void RemoteTransmitterComponent::await_target_time_() {
if (this->target_time_ == 0) {
this->target_time_ = current_time;
} else if ((int32_t) (this->target_time_ - current_time) > 0) {
#if defined(USE_LIBRETINY)
// busy loop for libretiny is required (see the comment inside micros() in wiring.c)
while ((int32_t) (this->target_time_ - micros()) > 0)
;
#else
delayMicroseconds(this->target_time_ - current_time);
#endif
}
}