connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Content Launcher feature map shows up as indexes instead of bitmask

Open andy31415 opened this issue 1 year ago • 3 comments

Definition of

<bitmap name="Feature" type="bitmap32">
     <cluster code="0x050a"/>
     <field name="ContentSearch" mask="0x1"/>
     <field name="URLPlayback" mask="0x2"/>
     <field name="AdvancedSeek" mask="0x3"/>
     <field name="TextTracks" mask="0x4"/>
     <field name="AudioTracks" mask="0x5"/>
   </bitmap>

is wrong because masks should be 0x01, 0x02, 0x04, 0x08, 0x10, ... instead of using indexes. This prevented us from migrating to feature bits for these features.

If we use these, there may be sideffects. Need to update the data type and validate if there are any sideffects in code (that thinks these are indexes instead of bitmasks).

andy31415 avatar May 14 '24 15:05 andy31415

Looks like the buggy XML was added in https://github.com/project-chip/connectedhomeip/pull/30691 @lazarkov @hawk248 @Brian-Resideo

bzbarsky-apple avatar May 14 '24 20:05 bzbarsky-apple

These are not actually used in the code today, but this should be fixed to prevent future issues in case developers reference the output from these.

chrisdecenzo avatar May 15 '24 17:05 chrisdecenzo

These are not actually used in the code today

They're shipped in the Android and Python APIs, no? (And Darwin, but we made sure to not expose this to API consumers so far....)

bzbarsky-apple avatar May 15 '24 22:05 bzbarsky-apple

We should also look into ZAP have an upgrade mechanism where things like this can be fixed. The latest ZAP can have upgrade rules to fix old .zap files opened with latest GSDK.

brdandu avatar Jun 03 '24 15:06 brdandu