RDKEMW-13898: simultaneous irdb codes from different vendors#220
Open
egalla204 wants to merge 5 commits into
Open
RDKEMW-13898: simultaneous irdb codes from different vendors#220egalla204 wants to merge 5 commits into
egalla204 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
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_tto 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.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
There was a problem hiding this comment.
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 = ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.