Skip to content

Commit

Permalink
Fix async HMDI CEC (#21287)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Apr 27, 2024
1 parent 311a9f1 commit bf01e5b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ void CmndHDMISendRaw(void) {
if (buf.len() > 0 && buf.len() < 16) {
bool success = HDMI_CEC_device->transmitRaw(buf.buf(), buf.len());
if (success) {
HDMI_CEC_device->run();
bool transmitting = true;
while (transmitting) {
HDMI_CEC_device->run();
transmitting = HDMI_CEC_device->isTransmitting();
if (transmitting) {
delay(1); // wait until next ms
}
}
ResponseCmndDone();
} else {
ResponseCmndChar_P(PSTR("Sending failed"));
Expand Down Expand Up @@ -166,7 +173,14 @@ void CmndHDMISend(void) {
if (buf.len() > 0 && buf.len() < 15) {
bool success = HDMI_CEC_device->transmitFrame(to, buf.buf(), buf.len());
if (success) {
HDMI_CEC_device->run();
bool transmitting = true;
while (transmitting) {
HDMI_CEC_device->run();
transmitting = HDMI_CEC_device->isTransmitting();
if (transmitting) {
delay(1); // wait until next ms
}
}
ResponseCmndDone();
} else {
ResponseCmndChar_P(PSTR("Sending failed"));
Expand Down

0 comments on commit bf01e5b

Please sign in to comment.