Skip to content

Commit 77d3fda

Browse files
SuGliderCopilot
andauthored
fix(matter): better commentary
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 62ef505 commit 77d3fda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/Matter/src/MatterEndpoints/MatterWindowCovering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,8 @@ bool MatterWindowCovering::setOperationalState(OperationalStatusField_t field, O
792792

793793
uint8_t currentStatus = val.val.u8;
794794
uint8_t fieldMask = (uint8_t)field;
795-
uint8_t fieldShift = (field == LIFT) ? 2 : 4; // LIFT: bits 2-3, TILT: bits 4-5
795+
// For clarity: LIFT uses shift 2 (bits 2-3), TILT uses shift 4 (bits 4-5)
796+
uint8_t fieldShift = (field == LIFT) ? 2 : 4;
796797

797798
// Extract current state for this field
798799
uint8_t currentFieldState = (currentStatus & fieldMask) >> fieldShift;

0 commit comments

Comments
 (0)