HDMI CEC: Fix HDMIType command (#20308)

According to documentation HDMIType is from 0 to 5 but the actual check is lower than 1 and above or equal 6, so the function is never applied. Also note that setting the HDMIType to 0 use the default type value 4, that make impossible the emulation of a TV device.
This commit is contained in:
DUPONCHEEL Sébastien 2023-12-25 08:54:53 +01:00 committed by GitHub
parent 6c0028de4e
commit c13886e00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ void CmndHDMISend(void) {
//
void CmndHDMIType(void) {
if (XdrvMailbox.data_len > 0) {
if ((XdrvMailbox.payload < 1) && (XdrvMailbox.payload >= CEC_Device::CDT_LAST)) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < CEC_Device::CDT_LAST)) {
uint8_t type = XdrvMailbox.payload;
if (type != Settings->hdmi_cec_device_type) {
Settings->hdmi_cec_device_type = XdrvMailbox.payload;