Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
srickardti committed Apr 28, 2022
2 parents 429e1ef + cfc3595 commit 9c25a48
Show file tree
Hide file tree
Showing 314 changed files with 11,045 additions and 6,112 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,18 @@ jobs:
'import("//with_pw_rpc.gni")'
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \
out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
# Disabled until Flash usage is reduced
# - name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
# timeout-minutes: 10
# run: |
# scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_wifi_wf200 BRD4161A --wifi wf200
# .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
# out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
timeout-minutes: 10
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false --wifi wf200
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
- name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A
timeout-minutes: 10
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \
out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
Expand Down
4 changes: 2 additions & 2 deletions build/chip/java/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ java_library("grandchild_library") {
}

java_prebuilt("java_prebuilt") {
jar_path = "/tmp/chip_java_build_test/prebuilt_jar.jar"
jar_path = "prebuilt_jar.jar"
deps = [ ":child_prebuilt" ]
}

java_prebuilt("child_prebuilt") {
jar_path = "/tmp/chip_java_build_test/child_jar.jar"
jar_path = "child_jar.jar"
}
Binary file added build/chip/java/tests/child_jar.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion build/chip/java/tests/generate_jars_for_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def generateJar(source_file, output_name):
'python3',
chip_root + '/build/chip/java/jar_runner.py',
'cf',
tmp_dir + '/' + output_name,
test_dir + '/' + output_name,
'-C',
tmp_classes_dir,
'.',
Expand Down
Binary file added build/chip/java/tests/prebuilt_jar.jar
Binary file not shown.
5 changes: 1 addition & 4 deletions build/chip/java/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# limitations under the License.

"""
Test for GN Java build rules. This test should be executed using ninja, and
generate_jars_for_test.py should have been called before running this test.
Test for GN Java build rules. This test should be executed using ninja.
"""

import json
Expand All @@ -33,8 +32,6 @@ class JavaBuildTest(unittest.TestCase):
jars_dir = 'python/lib' + local_test_dir
configs_dir = 'python/gen' + local_test_dir

tmp_dir = '/tmp/chip_java_build_test'

# Target names in the BUILD.gn
targets_to_check = [
'java_library',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ config NRF_802154_SER_RADIO
config NRF_RTC_TIMER_USER_CHAN_COUNT
int
default 2

config NRF_802154_ENCRYPTION
bool
default y
5 changes: 0 additions & 5 deletions config/tizen/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

import("//build_overrides/chip.gni")

declare_args() {
# Location of the Tizen SDK.
tizen_sdk_root = ""
}

chip_device_platform = "tizen"

chip_build_tests = false
Expand Down
6 changes: 6 additions & 0 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
help
Enables Thread Sleepy End Device support in Matter.

config CHIP_THREAD_SSED
bool "Enable Thread Synchronized Sleepy End Device support"
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
help
Enables Thread Synchronized Sleepy End Device support in Matter.

config CHIP_OTA_REQUESTOR
bool "Enable OTA requestor"
help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ server cluster ApplicationBasic = 1293 {
}

server cluster ApplicationLauncher = 1292 {
enum StatusEnum : ENUM8 {
enum ApplicationLauncherStatusEnum : ENUM8 {
kSuccess = 0;
kAppNotAvailable = 1;
kSystemBusy = 2;
Expand Down Expand Up @@ -339,16 +339,16 @@ server cluster BridgedActions = 37 {
}

server cluster Channel = 1284 {
enum LineupInfoTypeEnum : ENUM8 {
kMso = 0;
}

enum StatusEnum : ENUM8 {
enum ChannelStatusEnum : ENUM8 {
kSuccess = 0;
kMultipleMatches = 1;
kNoMatches = 2;
}

enum LineupInfoTypeEnum : ENUM8 {
kMso = 0;
}

bitmap ChannelFeature : BITMAP32 {
kChannelList = 0x1;
kLineupInfo = 0x2;
Expand Down Expand Up @@ -661,6 +661,12 @@ server cluster ColorControl = 768 {
}

server cluster ContentLauncher = 1290 {
enum ContentLaunchStatusEnum : ENUM8 {
kSuccess = 0;
kUrlNotAvailable = 1;
kAuthFailed = 2;
}

enum MetricTypeEnum : ENUM8 {
kPixels = 0;
kPercentage = 1;
Expand All @@ -682,12 +688,6 @@ server cluster ContentLauncher = 1290 {
kType = 12;
}

enum StatusEnum : ENUM8 {
kSuccess = 0;
kUrlNotAvailable = 1;
kAuthFailed = 2;
}

bitmap ContentLauncherFeature : BITMAP32 {
kContentSearch = 0x1;
kURLPlayback = 0x2;
Expand Down Expand Up @@ -1910,7 +1910,7 @@ server cluster KeypadInput = 1289 {
kData = 118;
}

enum StatusEnum : ENUM8 {
enum KeypadInputStatusEnum : ENUM8 {
kSuccess = 0;
kUnsupportedKey = 1;
kInvalidKeyInCurrentState = 2;
Expand Down Expand Up @@ -2057,14 +2057,7 @@ server cluster MediaInput = 1287 {
}

server cluster MediaPlayback = 1286 {
enum PlaybackStateEnum : ENUM8 {
kPlaying = 0;
kPaused = 1;
kNotPlaying = 2;
kBuffering = 3;
}

enum StatusEnum : ENUM8 {
enum MediaPlaybackStatusEnum : ENUM8 {
kSuccess = 0;
kInvalidStateForCommand = 1;
kNotAllowed = 2;
Expand All @@ -2073,6 +2066,13 @@ server cluster MediaPlayback = 1286 {
kSeekOutOfRange = 5;
}

enum PlaybackStateEnum : ENUM8 {
kPlaying = 0;
kPaused = 1;
kNotPlaying = 2;
kBuffering = 3;
}

readonly attribute PlaybackStateEnum currentState = 0;
readonly attribute nullable epoch_us startTime = 1;
readonly attribute nullable int64u duration = 2;
Expand Down Expand Up @@ -2752,9 +2752,9 @@ server cluster PumpConfigurationAndControl = 512 {
}

server cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u measuredValue = 0;
readonly attribute int16u minMeasuredValue = 1;
readonly attribute int16u maxMeasuredValue = 2;
readonly attribute nullable int16u measuredValue = 0;
readonly attribute nullable int16u minMeasuredValue = 1;
readonly attribute nullable int16u maxMeasuredValue = 2;
readonly attribute int16u tolerance = 3;
readonly attribute int16u clusterRevision = 65533;
}
Expand Down Expand Up @@ -2925,7 +2925,7 @@ server cluster Switch = 59 {
}

server cluster TargetNavigator = 1285 {
enum StatusEnum : ENUM8 {
enum TargetNavigatorStatusEnum : ENUM8 {
kSuccess = 0;
kTargetNotFound = 1;
kNotAllowed = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6768,7 +6768,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -6783,7 +6783,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x2710",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -10808,7 +10808,7 @@
"incoming": 1,
"outgoing": 0
},
{
{
"name": "GetYearDaySchedule",
"code": 15,
"mfgCode": null,
Expand Down Expand Up @@ -14909,7 +14909,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -14924,7 +14924,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x2710",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,18 @@ static void BoundDeviceChangedHandler(const EmberBindingTableEntry & binding, ch
}
}

static void BoundDeviceContextReleaseHandler(void * context)
{
(void) context;
}

static void InitBindingHandlerInternal(intptr_t arg)
{
auto & server = chip::Server::GetInstance();
chip::BindingManager::GetInstance().Init(
{ &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() });
chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(BoundDeviceChangedHandler);
chip::BindingManager::GetInstance().RegisterBoundDeviceContextReleaseHandler(BoundDeviceContextReleaseHandler);
}

CHIP_ERROR InitBindingHandlers()
Expand Down
75 changes: 73 additions & 2 deletions examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,30 @@ class EditAttributeListModel : public TouchesMatterStackModel
ESP_LOGI(TAG, "SystemMode changed to : %d", n);
app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Set(1, n);
}
else if (name == "Current Lift")
{
// update the current lift here for hardcoded endpoint 1
ESP_LOGI(TAG, "Current position lift percent 100ths changed to : %d", n * 100);
app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Set(1, static_cast<uint16_t>(n * 100));
}
else if (name == "Current Tilt")
{
// update the current tilt here for hardcoded endpoint 1
ESP_LOGI(TAG, "Current position tilt percent 100ths changed to : %d", n * 100);
app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Set(1, static_cast<uint16_t>(n * 100));
}
else if (name == "Opr Status")
{
// update the operational status here for hardcoded endpoint 1
ESP_LOGI(TAG, "Operational status changed to : %d", n);
app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, static_cast<uint8_t>(n));
}
else if (name == "Bat remaining")
{
// update the battery percent remaining here for hardcoded endpoint 1
ESP_LOGI(TAG, "Battery percent remaining changed to : %d", n);
app::Clusters::PowerSource::Attributes::BatteryPercentRemaining::Set(1, static_cast<uint8_t>(n * 2));
}
value = buffer;
}
else if (IsBooleanAttribute())
Expand Down Expand Up @@ -223,18 +247,47 @@ class EditAttributeListModel : public TouchesMatterStackModel
else
{
auto & name = std::get<0>(attribute);
auto & cluster = std::get<0>(std::get<1>(std::get<1>(devices[deviceIndex])[endpointIndex])[i]);
auto & cluster = std::get<0>(std::get<1>(std::get<1>(devices[deviceIndex])[endpointIndex])[0]);

ESP_LOGI(TAG, "editing attribute as string: '%s' (%s)", value.c_str(), i == 0 ? "+" : "-");
value = (value == "Closed") ? "Open" : "Closed";
ESP_LOGI(TAG, "name and cluster: '%s' (%s)", name.c_str(), cluster.c_str());
if (name == "State" && cluster == "Lock")
{
value = (value == "Closed") ? "Open" : "Closed";
using namespace chip::app::Clusters;
// update the doorlock attribute here
auto attributeValue = value == "Closed" ? DoorLock::DlLockState::kLocked : DoorLock::DlLockState::kUnlocked;
DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, attributeValue);
}
else if (name == "Charge level" && cluster == "Power Source")
{
using namespace chip::app::Clusters::PowerSource;
auto attributeValue = BatChargeLevel::kOk;

if (value == "OK")
{
value = "Warning";
attributeValue = BatChargeLevel::kWarning;
}
else if (value == "Warning")
{
value = "Critical";
attributeValue = BatChargeLevel::kCritical;
}
else
{
value = "OK";
attributeValue = BatChargeLevel::kOk;
}

// update the battery charge level here for hardcoded endpoint 1
ESP_LOGI(TAG, "Battery charge level changed to : %u", static_cast<uint8_t>(attributeValue));
app::Clusters::PowerSource::Attributes::BatteryChargeLevel::Set(1, static_cast<uint8_t>(attributeValue));
}
else
{
value = (value == "Closed") ? "Open" : "Closed";
}
}
}
};
Expand Down Expand Up @@ -520,6 +573,24 @@ void SetupPretendDevices()
app::Clusters::ColorControl::Attributes::CurrentHue::Set(1, 200);
AddAttribute("Current Saturation\n", "150");
app::Clusters::ColorControl::Attributes::CurrentSaturation::Set(1, 150);

AddDevice("Window Covering");
AddEndpoint("1");
AddCluster("Window Covering");
AddAttribute("Current Lift", "5");
app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Set(1, static_cast<uint16_t>(5 * 100));
AddAttribute("Current Tilt", "5");
app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Set(1, static_cast<uint16_t>(5 * 100));
AddAttribute("Opr Status", "0");
app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, static_cast<uint8_t>(0));

AddDevice("Battery");
AddEndpoint("1");
AddCluster("Power Source");
AddAttribute("Bat remaining", "70");
app::Clusters::PowerSource::Attributes::BatteryPercentRemaining::Set(1, static_cast<uint8_t>(70 * 2));
AddAttribute("Charge level", "0");
app::Clusters::PowerSource::Attributes::BatteryChargeLevel::Set(1, static_cast<uint8_t>(0));
}

esp_err_t InitM5Stack(std::string qrCodeText)
Expand Down
Loading

0 comments on commit 9c25a48

Please sign in to comment.