Matter Ikea Scroll: Aggregate multiple responses into one event, remove InitialPress handling during scroll#3014
Conversation
|
Channel deleted. |
Test Results 73 files 515 suites 0s ⏱️ Results for commit 1799207. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 1799207 |
336c8e1 to
0ca61eb
Compare
0ca61eb to
1fa21e3
Compare
| local presses_in_current_chain = 0 | ||
| for _, ib in ipairs(info_blocks) do | ||
| if ib.info_block.event_id == clusters.Switch.events.MultiPressOngoing.ID then | ||
| presses_in_current_chain = presses_in_current_chain + (ib.info_block.data.elements and ib.info_block.data.elements.current_number_of_presses_counted.value or 0) |
There was a problem hiding this comment.
If the message contains multiple MultiPressOngoing events I think we want to take the current_number_of_presses_counted from the last one and not add the value reported in each one. For example, say we receive a message that has MultiPressOngoing events with current_number_of_presses_counted values of 3, 6 and 12. We want the result to be 12, not 3 + 6 + 12.
There was a problem hiding this comment.
ah, yeah that's very true. Will make that update!
Description of Change
Add aggregation logic to ensure that only the last info block is handled when multiple responses come in to the driver at once, leaving all single-response chunks unaltered. This should aggregate all un-handled steps into before sending out the single event.
Remove any mapping for InitialPress to a rotateAmount event.
Summary of Completed Tests
Tested on various numbers of devices to ensure performant behavior across these varying cases.