You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`onBlindLift()`**: Callback function that handles window covering lift changes. This is registered with `WindowBlinds.onGoToLiftPercentage()` and is triggered when `TargetPositionLiftPercent100ths` changes. The callback receives the target lift percentage (0-100%).
99
+
-**`onBlindsLift()`**: Callback function that handles window covering lift changes. This is registered with `WindowBlinds.onGoToLiftPercentage()` and is triggered when `TargetPositionLiftPercent100ths` changes. The callback receives the target lift percentage (0-100%).
100
100
-**`setup()`**: Initializes Wi-Fi (if needed), Window Covering endpoint with `ROLLERSHADE` type, registers the callback, and starts Matter.
101
101
-**`loop()`**: Empty - all control is handled via Matter callbacks.
102
102
103
103
## Customization
104
104
105
105
### Adding Motor Control
106
106
107
-
In the `onBlindLift()` callback, replace the simulation code with actual motor control:
107
+
In the `onBlindsLift()` callback, replace the simulation code with actual motor control:
108
108
109
109
```cpp
110
-
boolonBlindLift(uint8_t liftPercent) {
110
+
boolonBlindsLift(uint8_t liftPercent) {
111
111
Serial.printf("Moving window covering to %d%%\r\n", liftPercent);
112
112
113
113
// Here you would control your actual motor/actuator
3. **Commands not working**: Ensure the callback returns `true` to accept the command. If it returns `false`, the command will be rejected.
133
133
134
-
4. **Motor not responding**: Replace the simulation code in `onBlindLift()` with your actual motor control implementation. Remember to update `CurrentPosition` and set `OperationalState` to `STALL` when movement is complete.
134
+
4. **Motor not responding**: Replace the simulation code in `onBlindsLift()` with your actual motor control implementation. Remember to update `CurrentPosition` and set `OperationalState` to `STALL` when movement is complete.
0 commit comments