forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chef: Fix FanControl mode/speed interdependence behavior (project-chi…
…p#36256) * chef: Fix FanControl mode/speed interdepency behavior This PR implements the FanControl logic to ensure the interdependent behavior between Mode/Speed/Percent is coherent. This is based on what was done in the AirPurifier examples. Changes: * Removed Custom Write/Read * Updated Zap file `SpeedMax` default to 10 instead of 100 * Forward `MatterPostAttributeChangeCallback` FanControl-related changes to `ChefFanControlManager` * Implements Mode/Speed/Percent interdependency logic based on the AirPurifier example Test: * Verified that Mode, Speed and SpeedPercent change accordingly when any of those attributes change and cross a boundary. * ifdef out code for non-fancontrol examples. * Address Boris' review feedback * Update examples/chef/common/chef-fan-control-manager.cpp Co-authored-by: Andrei Litvin <[email protected]> * Andrei's review suggestions * review suggestions: clarify Auto behavior and use struct for ranges. * Fix minor bug introduced when addressing review suggestions (!= vs ==) * Update examples/chef/common/chef-fan-control-manager.cpp Co-authored-by: Andrei Litvin <[email protected]> * fix const * Apply suggestions from Andrei's code review Co-authored-by: Andrei Litvin <[email protected]> * Restyled by clang-format * Apply Boris' suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Address Boris' review suggestions --------- Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
- Loading branch information
1 parent
dfd3749
commit 7d9507b
Showing
5 changed files
with
266 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* | ||
* Copyright (c) 2024 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <lib/core/DataModelTypes.h> | ||
|
||
#ifdef MATTER_DM_PLUGIN_FAN_CONTROL_SERVER | ||
void HandleFanControlAttributeChange(AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.