Skip to content

RDKEMW-13898: simultaneous irdb codes from different vendors#220

Open
egalla204 wants to merge 5 commits into
developfrom
RDKEMW-13898_irdb-codes-from-different-vendors
Open

RDKEMW-13898: simultaneous irdb codes from different vendors#220
egalla204 wants to merge 5 commits into
developfrom
RDKEMW-13898_irdb-codes-from-different-vendors

Conversation

@egalla204
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 18:06
@egalla204 egalla204 requested a review from a team as a code owner May 1, 2026 18:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the IR RF database to track IRDB vendor metadata (ID + name) alongside TV/AVR IR code IDs, persists that metadata in the ControlMgr database, and uses it in the BLE programming flow to prevent mixing IR codes from different vendors.

Changes:

  • Extend ctrlm_ir_rf_db_t to store TV/AVR vendor ID and vendor name, and persist them via ControlMgr DB read/write helpers.
  • Update ControlMgr DB helpers to read/write new vendor keys for TV/AVR IR code entries.
  • Update BLE IR programming to clear the opposite device’s codes when switching IRDB vendors and to pass vendor info into add_irdb_codes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/network/ctrlm_ir_rf_db.h Extends IR RF DB API and state with vendor ID/name getters and storage.
src/network/ctrlm_ir_rf_db.cpp Implements vendor tracking, DB persistence, and logging of vendor info.
src/database/ctrlm_database.h Updates DB API signatures to include vendor ID/name for TV/AVR IR code entries.
src/database/ctrlm_database.cpp Persists new DB keys for vendor ID/name and reads them back during load.
src/ble/ctrlm_ble_network.cpp Adds vendor-mismatch clearing logic and passes vendor info when adding IRDB codes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/network/ctrlm_ir_rf_db.h
Comment thread src/database/ctrlm_database.cpp
Comment thread src/database/ctrlm_database.cpp
Comment thread src/ble/ctrlm_ble_network.cpp Outdated
Copy link
Copy Markdown
Contributor

@dwolaver dwolaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved for QA test

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings May 4, 2026 14:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -60,7 +60,7 @@ class ctrlm_ir_rf_db_t {
* @param ir_codes A keymap supplied from the CTRLM IRDB component
* @reutrn True if the entries were added to the IRRF Database, False otherwise.
Comment on lines +797 to +805
if (dqm->ir_codes->type == CTRLM_IRDB_DEV_TYPE_TV && (ir_rf_database_.get_avr_ir_vendor_id() != 0 && ir_rf_database_.get_avr_ir_vendor_id() != dqm->vendor_info.rcu_support_bitmask) ) {
// if we are programming TV codes but the previous AVR codes are from a different IRDB vendor, then clear out the AVR codes.
// the remote cannot send different codes from different IRDB vendors at the same time.
XLOGD_INFO("Programming TV codes from vendor %s(0x%X), but currently have AVR codes from %s(0x%X). Clearing AVR codes.",
dqm->vendor_info.name.c_str(), (unsigned int)dqm->vendor_info.rcu_support_bitmask,
ir_rf_database_.get_avr_ir_vendor_name().c_str(), (unsigned int)ir_rf_database_.get_avr_ir_vendor_id());

ir_rf_database_.clear_avr_ir_codes();

Comment on lines +736 to 742
ctrlm_db_read_blob(CTRLM_DB_TABLE_CTRLMGR, CTRLM_DB_TV_IR_VENDOR_NAME, &data, &length);
if(NULL != data) {
vendor_name.assign((char *)data, length);
ctrlm_db_free(data);
} else {
XLOGD_WARN("Failed to load %s from db", CTRLM_DB_TV_IR_VENDOR_NAME);
}
Comment on lines +772 to +773
} else {
XLOGD_WARN("Failed to load %s from db", CTRLM_DB_AVR_IR_VENDOR_NAME);
* @reutrn True if the entries were added to the IRRF Database, False otherwise.
*/
bool add_irdb_codes(ctrlm_irdb_ir_code_set_t *ir_codes);
bool add_irdb_codes(ctrlm_irdb_ir_code_set_t *ir_codes, unsigned char ir_vendor_id = 0, const std::string &ir_vendor_name = "");
@egalla204 egalla204 requested a review from a team May 6, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants