-
Notifications
You must be signed in to change notification settings - Fork 31
[SL-ONLY] Feature/rangehood app #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,29 @@ | |||
| # Copyright (c) 2025 Project CHIP Authors | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| static void ActionInitiated(RangeHoodManager::Action_t aAction, int32_t aActor, uint8_t * value); | ||
| static void ActionCompleted(RangeHoodManager::Action_t aAction); | ||
|
|
||
| static void LightActionEventHandler(AppEvent * aEvent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is not being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button event handler added for Fancontrol so this is not required so removed, thanks for the comment @chirag-silabs
| * @param aEvent button event being processed | ||
| */ | ||
| static void ButtonHandler(AppEvent * aEvent); | ||
| // Work item executed on CHIP stack thread to toggle fan mode safely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comments for the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments and renamed it to FanControlButtonHandler as BTN1 is used for Fan control ON/OFF.
| uint8_t percentCurrent; | ||
| uint8_t speedCurrent; | ||
|
|
||
| // Fan Mode Limits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these being used anywhere?
| : FanControl::Delegate(aEndpoint), mEndpoint(aEndpoint) {} | ||
|
|
||
| protected: | ||
| EndpointId mEndpoint = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by default endpoint should be invalid endpoint
| */ | ||
| Status HandleStep(StepDirectionEnum aDirection, bool aWrap, bool aLowestOff) override; | ||
|
|
||
| FanDelegate(EndpointId aEndpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally constructor should be before other functions
| CHIP_ERROR LightEndpoint::Init() | ||
| { | ||
| bool state = false; | ||
| OnOffServer::Instance().getOnOffValue(mEndpointId, &state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should call with the ChipTask lock
| bool LightEndpoint::GetOnOffState() | ||
| { | ||
| bool state = false; | ||
| OnOffServer::Instance().getOnOffValue(mEndpointId, &state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should call with the ChipTask lock
| void LightEndpoint::SetOnOffState(bool state) | ||
| { | ||
| CommandId commandId = state ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id; | ||
| auto status = OnOffServer::Instance().setOnOffValue(mEndpointId, commandId, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should call with the ChipTask lock
| @@ -0,0 +1,29 @@ | |||
| # Copyright (c) 2025 Project CHIP Authors | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate file to be removed
| import("${chip_root}/src/platform/silabs/wifi/args.gni") | ||
|
|
||
| sl_enable_test_event_trigger = false | ||
| chip_enable_ota_requestor = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be true
|
|
||
| #define APP_TASK_NAME "RangeHood" | ||
|
|
||
| #define BLE_DEV_NAME "SiLabs-RangeHood" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use Silabs-$APP_TASK_NAME
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as per suggestion
| #endif // SL_LCDCTRL_MUX | ||
| } | ||
|
|
||
| void RangeHoodUI::DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use the font avialable in GLIB directly, these are written for thermostat for a specific purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as did not use.
Summary
Related issues
Testing
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines