mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
Fix async HMDI CEC (#21287)
This commit is contained in:
parent
311a9f18e6
commit
bf01e5bb70
@ -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"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user