mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
all_device_types_app: Fix the fan control clusters delegate and add comment.
This commit is contained in:
@@ -141,7 +141,9 @@ esp_err_t app_driver_init();
|
||||
class FanDelegateImpl:public chip::app::Clusters::FanControl::Delegate
|
||||
{
|
||||
public:
|
||||
FanDelegateImpl(uint16_t aEndpoint):Delegate(aEndpoint){}
|
||||
// Constructor to match the base class design, however endpoint_id set here is not being using at all.
|
||||
// FanControlDelegateInitCB sets the delegate on correct endpoint while initialization.
|
||||
FanDelegateImpl():Delegate(chip::kInvalidEndpointId) {}
|
||||
|
||||
chip::Protocols::InteractionModel::Status HandleStep(chip::app::Clusters::FanControl::StepDirectionEnum aDirection, bool aWrap, bool aLowestOff);
|
||||
};
|
||||
|
||||
@@ -230,7 +230,7 @@ int create(uint8_t device_type_index)
|
||||
case ESP_MATTER_FAN: {
|
||||
esp_matter::endpoint::fan::config_t fan_config;
|
||||
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S3
|
||||
static FanDelegateImpl fan_delegate(app_endpoint_id);
|
||||
static FanDelegateImpl fan_delegate;
|
||||
fan_config.fan_control.delegate = &fan_delegate;
|
||||
#endif
|
||||
endpoint = esp_matter::endpoint::fan::create(node, &fan_config, ENDPOINT_FLAG_NONE, NULL);
|
||||
|
||||
Reference in New Issue
Block a user