Skip to content
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

Restyle [QPG6100] Add initial lighting app version #4959

Closed
wants to merge 3 commits into from

Conversation

restyled-io[bot]
Copy link
Contributor

@restyled-io restyled-io bot commented Feb 22, 2021

A duplicate of #4958 with additional commits that automatically address
incorrect style, created by Restyled.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it with only
the style fixes.

The following Restylers made fixes:

  • clang-format
  • gn

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Expand for example instructions
    ```console
    git remote add upstream https://github.com/project-chip/connectedhomeip.git
    git fetch upstream pull/<this PR number>/head
    git merge --ff-only FETCH_HEAD
    git push
    ```
    

NOTE: As work continues on the original Pull Request, this process will
re-run and update (force-push) this Pull Request with updated style fixes as
necessary. If the style is fixed manually at any point (i.e. this process finds
no fixes to make), this Pull Request will be closed automatically.

Sorry if this was unexpected. To disable it, see our documentation.

@restyled-io restyled-io bot added the restyled label Feb 22, 2021
@todo
Copy link

todo bot commented Feb 22, 2021

PR # 2939 - OT support

// TODO: PR # 2939 - OT support
// SetDeviceName("QPG6100LightingDemo._chip._udp.local.");
while (true)
{
BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10));
while (eventReceived == pdTRUE)
{
sAppTask.DispatchEvent(&event);
eventReceived = xQueueReceive(sAppEventQueue, &event, 0);
}


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jim Lyall seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@todo
Copy link

todo bot commented Feb 22, 2021

PR # 2939 - OT support

// TODO: PR # 2939 - OT support
/*
PublishService();
*/
mLastChangeTimeUS = nowUS;
}
}
}
void AppTask::LightingActionEventHandler(AppEvent * aEvent)
{


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@todo
Copy link

todo bot commented Feb 22, 2021

hijacked the function button to change level

// TODO hijacked the function button to change level
button_event.Type = AppEvent::kEventType_Level;
button_event.Handler = LightingActionEventHandler;
sAppTask.PostEvent(&button_event);
}
}
void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
{
AppEvent event;
event.Type = AppEvent::kEventType_Timer;


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@todo
Copy link

todo bot commented Feb 22, 2021

understand well enough to implement the level cluster ZCL_CURRENT_LEVEL_ATTRIBUTE_ID

// TODO understand well enough to implement the level cluster ZCL_CURRENT_LEVEL_ATTRIBUTE_ID
status = emberAfWriteAttribute(1, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER,
(uint8_t *) &newValue, ZCL_DATA8_ATTRIBUTE_TYPE);
if (status != EMBER_ZCL_STATUS_SUCCESS)
{
ChipLogError(NotSpecified, "ERR: updating level %x", status);
}
}


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@todo
Copy link

todo bot commented Feb 22, 2021

this function is called InitiateAction because we want to implement some features such as ramping up here.

// TODO: this function is called InitiateAction because we want to implement some features such as ramping up here.
bool action_initiated = false;
State_t new_state;
switch (aAction)
{
case ON_ACTION:
ChipLogProgress(NotSpecified, "LightingManager::InitiateAction(ON_ACTION)");
break;
case OFF_ACTION:
ChipLogProgress(NotSpecified, "LightingManager::InitiateAction(OFF_ACTION)");


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@todo
Copy link

todo bot commented Feb 22, 2021

Issue #3841

* TODO Issue #3841
* emberAfOnOffClusterInitCallback happens before the stack initialize the cluster
* attributes to the default value.
* The logic here expects something similar to the deprecated Plugins callback
* emberAfPluginOnOffClusterServerPostInitCallback.
*
*/
void emberAfOnOffClusterInitCallback(EndpointId endpoint)
{
GetAppTask().UpdateClusterState();
}


This comment was generated by todo based on a TODO comment in 69affc9 in #4959. cc @project-chip.

@restyled-io restyled-io bot closed this Feb 22, 2021
@restyled-io restyled-io bot deleted the restyled/pull-4958 branch February 22, 2021 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants