Skip to content

Commit

Permalink
added: Sharp uses vendor id 0x534850 too. issue #36
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Nov 30, 2015
1 parent 779a25a commit 4905a70
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/cectypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ typedef enum cec_vendor_id
CEC_VENDOR_SHARP = 0x08001F,
CEC_VENDOR_SONY = 0x080046,
CEC_VENDOR_BROADCOM = 0x18C086,
CEC_VENDOR_SHARP2 = 0x534850,
CEC_VENDOR_VIZIO = 0x6B746D,
CEC_VENDOR_BENQ = 0x8065E9,
CEC_VENDOR_HARMAN_KARDON = 0x9C645E,
Expand Down
1 change: 1 addition & 0 deletions src/LibCecSharp/CecSharpTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ namespace CecSharp
Sharp = 0x08001F,
Sony = 0x080046,
Broadcom = 0x18C086,
Sharp2 = 0x534850,
Vizio = 0x6B746D,
Benq = 0x8065E9,
HarmanKardon = 0x9C645E,
Expand Down
1 change: 1 addition & 0 deletions src/libcec/CECTypeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ namespace CEC
case CEC_VENDOR_MEDION:
return "Medion";
case CEC_VENDOR_SHARP:
case CEC_VENDOR_SHARP2:
return "Sharp";
case CEC_VENDOR_VIZIO:
return "Vizio";
Expand Down
2 changes: 2 additions & 0 deletions src/libcec/devices/CECBusDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,15 @@ bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */)
m_handler = new CRHCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
case CEC_VENDOR_SHARP:
case CEC_VENDOR_SHARP2:
m_handler = new CAQCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
default:
m_handler = new CCECCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
}

/** override the vendor ID set in the handler, as a single vendor may have multiple IDs */
m_handler->SetVendorId(m_vendor);
bInitHandler = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcec/implementations/CECCommandHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace CEC
virtual bool HandleCommand(const cec_command &command);
virtual cec_vendor_id GetVendorId(void) { return m_vendorId; };
virtual void SetVendorId(cec_vendor_id vendorId) { m_vendorId = vendorId; }
static bool HasSpecificHandler(cec_vendor_id vendorId) { return vendorId == CEC_VENDOR_LG || vendorId == CEC_VENDOR_SAMSUNG || vendorId == CEC_VENDOR_PANASONIC || vendorId == CEC_VENDOR_PHILIPS || vendorId == CEC_VENDOR_SHARP || vendorId == CEC_VENDOR_TOSHIBA || vendorId == CEC_VENDOR_TOSHIBA2 || vendorId == CEC_VENDOR_ONKYO;}
static bool HasSpecificHandler(cec_vendor_id vendorId) { return vendorId == CEC_VENDOR_LG || vendorId == CEC_VENDOR_SAMSUNG || vendorId == CEC_VENDOR_PANASONIC || vendorId == CEC_VENDOR_PHILIPS || vendorId == CEC_VENDOR_SHARP || vendorId == CEC_VENDOR_SHARP2 || vendorId == CEC_VENDOR_TOSHIBA || vendorId == CEC_VENDOR_TOSHIBA2 || vendorId == CEC_VENDOR_ONKYO;}

virtual bool InitHandler(void) { return true; }
virtual bool ActivateSource(bool bTransmitDelayedCommandsOnly = false);
Expand Down

0 comments on commit 4905a70

Please sign in to comment.