Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrfconnect] Include GenericSwitch in light-switch example (#19848)
* [nrfconnect] Include GenericSwitch in light-switch example In matter there are 2 types of light switch device types: - On/Off Light Switch, Dimmer Switch, Color Dimmer Switch, Control Bridge - Generic Switch Up to now only the first type was shown in the light-switch example. This commit adds GenericSwitch for the nrfconnect light-switch sample. The GenericSwitch has been added on EP 2 and uses button 3. Testing using chip-tool and DK: chip-tool interactive start Subscribe to the initial-press and short-release >>> switch subscribe-event initial-press 1 20 <node_id> 2 --is-urgent true >>> switch subscribe-event initial-press 1 20 <node_id> 2 --is-urgent true The code implements a momentary switch with features MS and MSR. * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-markdown * Add missed generated file. * Restyled by prettier-markdown * Adress review comments * Directly calling GenericSwitchInitialPress/GenericSwitchReleasePress without Timer * Rename newPosition/previousPosition * Update zap * Remove Switch cluster on EP0 * Disabled Groups, Scenes, Binding on EP2 * Named EP2 * Correct previousPosition and newPosition. * Apply suggestions from code review Thanks @greg-fer. Co-authored-by: Grzegorz Ferenc <[email protected]> * Restyled by clang-format * Restyled by prettier-markdown * Correct second subscription command in README * Remove leading >>> in commands * Use backticks for commands Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Grzegorz Ferenc <[email protected]>
- Loading branch information