Fix async HMDI CEC (#21287)

This commit is contained in:
s-hadinger 2024-04-27 18:22:50 +02:00 committed by GitHub
parent 311a9f18e6
commit bf01e5bb70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,14 @@ void CmndHDMISendRaw(void) {
if (buf.len() > 0 && buf.len() < 16) { if (buf.len() > 0 && buf.len() < 16) {
bool success = HDMI_CEC_device->transmitRaw(buf.buf(), buf.len()); bool success = HDMI_CEC_device->transmitRaw(buf.buf(), buf.len());
if (success) { 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(); ResponseCmndDone();
} else { } else {
ResponseCmndChar_P(PSTR("Sending failed")); ResponseCmndChar_P(PSTR("Sending failed"));
@ -166,7 +173,14 @@ void CmndHDMISend(void) {
if (buf.len() > 0 && buf.len() < 15) { if (buf.len() > 0 && buf.len() < 15) {
bool success = HDMI_CEC_device->transmitFrame(to, buf.buf(), buf.len()); bool success = HDMI_CEC_device->transmitFrame(to, buf.buf(), buf.len());
if (success) { 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(); ResponseCmndDone();
} else { } else {
ResponseCmndChar_P(PSTR("Sending failed")); ResponseCmndChar_P(PSTR("Sending failed"));