Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
selissia authored Apr 29, 2022
2 parents b088f83 + 3ab44ab commit 8530810
Show file tree
Hide file tree
Showing 443 changed files with 51,435 additions and 89,273 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 .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 30
timeout-minutes: 40
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 45
timeout-minutes: 50
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
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 @@ -1222,6 +1222,11 @@ server cluster DoorLock = 257 {
INT16U userIndex = 1;
}

request struct ClearWeekDayScheduleRequest {
INT8U weekDayIndex = 0;
INT16U userIndex = 1;
}

request struct SetYearDayScheduleRequest {
INT8U yearDayIndex = 0;
INT16U userIndex = 1;
Expand Down Expand Up @@ -1299,6 +1304,7 @@ server cluster DoorLock = 257 {
timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3;
command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11;
command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12;
command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13;
command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14;
command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15;
timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26;
Expand Down Expand Up @@ -1910,7 +1916,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 +2063,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 +2072,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 +2758,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 +2931,7 @@ server cluster Switch = 59 {
}

server cluster TargetNavigator = 1285 {
enum StatusEnum : ENUM8 {
enum TargetNavigatorStatusEnum : ENUM8 {
kSuccess = 0;
kTargetNotFound = 1;
kNotAllowed = 2;
Expand Down
18 changes: 13 additions & 5 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
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 @@ -10800,6 +10800,14 @@
"incoming": 1,
"outgoing": 0
},
{
"name": "ClearWeekDaySchedule",
"code": 13,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "SetYearDaySchedule",
"code": 14,
Expand All @@ -10808,7 +10816,7 @@
"incoming": 1,
"outgoing": 0
},
{
{
"name": "GetYearDaySchedule",
"code": 15,
"mfgCode": null,
Expand Down Expand Up @@ -14909,7 +14917,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -14924,7 +14932,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "0x2710",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
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 8530810

Please sign in to comment.