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

[nrf5] Add nRF5 Lighting Example App #1436

Merged
merged 5 commits into from
Jul 8, 2020

Conversation

erjiaqing
Copy link
Contributor

Problem

Currently, we have a nRF5 lock app as a example, however, we does not have related ZCLs along with the code, however, we have On-Off cluster and Level Control Cluster, which is quite suitable for an example lighting app.

The code modification should not be large since most of the code should be same, however, the BoltLockManager should be replaced with another class representing a light.

This PR adds nrf5 lighting-app demo.

Summary of Changes

This PR copied lock example and then replaced BoltLockManager to LightingManager.

However, I still have some concerns that what if we keep adding more examples to the examples? Maybe we need to extract common code to seperate directories so we can reuse them in different examples.

fixes #1259


#include <platform/CHIPDeviceLayer.h>

#define FACTORY_RESET_TRIGGER_TIMEOUT 3000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: since this is C++, maybe consider for files:

  • constexpr instead of #defines
  • anonymous namespace to avoid 'static' everywhere.

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2020

CLA assistant check
All committers have signed the CLA.

@erjiaqing erjiaqing requested a review from andy31415 July 8, 2020 10:15
@woody-apple woody-apple merged commit 64e9c43 into project-chip:master Jul 8, 2020
@erjiaqing erjiaqing deleted the nrf52_light branch January 29, 2021 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add nRF5 example lighting-app
7 participants