Skip to content

Commit

Permalink
Merge branch 'master' into expand_AttributePersistanceProvider_API
Browse files Browse the repository at this point in the history
  • Loading branch information
hicklin authored Jul 7, 2023
2 parents 333ac54 + 53e06c7 commit 4f9c481
Show file tree
Hide file tree
Showing 99 changed files with 4,964 additions and 1,173 deletions.
9 changes: 6 additions & 3 deletions .github/actions/checkout-submodules/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
runs:
using: "composite"
steps:
- name: Checkout submodules
shell: bash
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}
- uses: Wandalen/[email protected]
name: Checkout submodules
with:
command: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }}
attempt_limit: 3
attempt_delay: 2000
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-efr32:0.7.3
image: connectedhomeip/chip-build-efr32:0.7.25
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/kotlin-detekt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Kotlin - Detekt

on:
pull_request:
paths:
- "**/*.kt"
- ".github/workflows/kotlin-detekt.yaml"

jobs:
detekt:
runs-on: ubuntu-latest

steps:
- name: "checkout"
uses: actions/checkout@v2

- name: "detekt"
uses: natiginfo/[email protected]
with:
args: --parallel --input examples/android/CHIPTest/,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java
7 changes: 6 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ jobs:
"
- name: Run Tests using the python parser sending commands to chip-tool
# https://github.com/project-chip/connectedhomeip/issues/27673
if: matrix.build_variant != 'no-ble-tsan-clang'
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down Expand Up @@ -286,7 +288,8 @@ jobs:

strategy:
matrix:
build_variant: [no-ble-tsan-clang, no-ble-asan-clang]
build_variant: [no-ble-asan-clang]
# Since no-ble-tsan-clang doesn't run any tests, this is just wasted CI time for now
chip_tool: [""]
env:
BUILD_VARIANT: ${{matrix.build_variant}}
Expand Down Expand Up @@ -350,6 +353,8 @@ jobs:
"
- name: Run Tests using the python parser sending commands to chip-tool
# https://github.com/project-chip/connectedhomeip/issues/27673
if: matrix.build_variant != 'no-ble-tsan-clang'
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ example on ESP32 series of SoCs
- [Flash and NVS encryption for securing factory data](flash_nvs_encryption.md)
- [RPC Console and Device Tracing](rpc_console.md)
- [Matter OTA](ota.md)
- [Generating and Using ESP Secure Cert Parttiton](secure_cert_partition.md)
- [Generating and Using ESP Secure Cert Partition](secure_cert_partition.md)
2 changes: 1 addition & 1 deletion examples/all-clusters-app/asr/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ asr_executable("clusters_app") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${examples_plat_dir}/ButtonHandler.cpp",
"${examples_plat_dir}/CHIPDeviceManager.cpp",
"${examples_plat_dir}/LEDWidget.cpp",
"${examples_plat_dir}/init_Matter.cpp",
"${examples_plat_dir}/init_asrPlatform.cpp",
"${examples_plat_dir}/shell/matter_shell.cpp",
"src/AppTask.cpp",
"src/ButtonHandler.cpp",
"src/DeviceCallbacks.cpp",
"src/main.cpp",
]
Expand Down
8 changes: 0 additions & 8 deletions examples/all-clusters-app/asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@ control on ASR platform.
---

- [Matter ASR All Clusters Example](#matter-asr-all-clusters-example)
- [Supported Chips](#supported-chips)
- [Building and Commissioning](#building-and-commissioning)
- [Cluster Control](#cluster-control)
- [Light switch press button and light status LED](#light-switch-press-button-and-light-status-led)

---

## Supported Chips

The Matter demo application is supported on:

- ASR582X
- ASR595X

## Building and Commissioning

Please refer
Expand Down
12 changes: 0 additions & 12 deletions examples/all-clusters-app/asr/include/AppConfig.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@

#define MATTER_DEVICE_NAME "ASR-Clusters"

#define GPIO_TASK_NAME "gpio"
#define GPIO_TASK_STACK_SIZE 1024

#define APP_BUTTON_PRESSED 0
#define APP_BUTTON_RELEASED 1

#define SWITCH1_BUTTON GPIO12_INDEX
#define SWITCH2_BUTTON GPIO13_INDEX

#define LIGHT1_LED PWM_OUTPUT_CH4
#define LIGHT2_LED PWM_OUTPUT_CH6

// Time it takes in ms for the simulated actuator to move from one
// state to another.
#define ACTUATOR_MOVEMENT_PERIOS_MS 2000
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/asr/include/AppTask.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AppTask
CHIP_ERROR StartAppTask();
static void AppTaskMain(void * pvParameter);
static void AppEventHandler(AppEvent * aEvent);
void PostButtonEvent(uint8_t btnIdx, uint8_t btnAction);
void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction);
void PostEvent(const AppEvent * event);
/**
* Use internally for registration of the ChipDeviceEvents
Expand Down
53 changes: 0 additions & 53 deletions examples/all-clusters-app/asr/include/ButtonHandler.h

This file was deleted.

15 changes: 8 additions & 7 deletions examples/all-clusters-app/asr/src/AppTask.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ using namespace ::chip::DeviceManager;
using namespace ::chip::DeviceLayer;
using namespace ::chip::System;

LEDWidget sStatusLED;
LEDWidget sLightLED;

namespace {
Expand Down Expand Up @@ -119,7 +118,11 @@ CHIP_ERROR AppTask::Init()
ConfigurationMgr().LogDeviceConfig();

// Print setup info
#if CONFIG_NETWORK_LAYER_BLE
PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE));
#else
PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kOnNetwork));
#endif /* CONFIG_NETWORK_LAYER_BLE */

return CHIP_NO_ERROR;
}
Expand All @@ -131,8 +134,7 @@ void AppTask::AppTaskMain(void * pvParameter)

ButtonHandler::Init();

sLightLED.Init(LIGHT1_LED); // embedded board light
sStatusLED.Init(LIGHT2_LED);
sLightLED.Init(LIGHT_LED);

lega_rtos_start_timer(&sAppTimer);

Expand Down Expand Up @@ -186,7 +188,6 @@ void AppTask::AppEventHandler(AppEvent * aEvent)
if (lightState)
{
sLightLED.Set(1);
sLightLED.SetBrightness(100);
}
else
{
Expand All @@ -213,9 +214,9 @@ void AppTask::AppTimerCallback(void * params)
sAppTask.PostEvent(&timer_event);
}

void AppTask::PostButtonEvent(uint8_t btnIdx, uint8_t btnAction)
void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction)
{
ASR_LOG("%s %s\n", btnIdx == SWITCH1_BUTTON ? "btn1" : "btn2", btnAction == APP_BUTTON_PRESSED ? "Pressed" : "Released");
ASR_LOG("%s %s\n", btnIdx == SWITCH1_BUTTON ? "btn1" : "btn2", btnAction == BUTTON_PRESSED ? "Pressed" : "Released");

if (btnIdx != SWITCH1_BUTTON && btnIdx != SWITCH2_BUTTON)
{
Expand All @@ -227,7 +228,7 @@ void AppTask::PostButtonEvent(uint8_t btnIdx, uint8_t btnAction)
button_event.ButtonEvent.ButtonIdx = btnIdx;
button_event.ButtonEvent.Action = btnAction;

if (btnAction == APP_BUTTON_RELEASED)
if (btnAction == BUTTON_RELEASED)
{
button_event.Handler = AppEventHandler;
sAppTask.PostEvent(&button_event);
Expand Down
117 changes: 0 additions & 117 deletions examples/all-clusters-app/asr/src/ButtonHandler.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions examples/all-clusters-app/asr/src/DeviceCallbacks.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ using namespace ::chip::DeviceManager;
using namespace ::chip::Logging;

extern LEDWidget sLightLED;
extern LEDWidget sStatusLED;

uint32_t identifyTimerCount;
constexpr uint32_t kIdentifyTimerDelayMS = 250;
Expand Down Expand Up @@ -191,7 +190,6 @@ void DeviceCallbacks::OnLevelPostAttributeChangeCallback(EndpointId endpointId,
{
uint8_t tmp = *value;
ChipLogProgress(Zcl, "New level: %u ", tmp);
sLightLED.SetBrightness(tmp);
}
else
{
Expand Down
Loading

0 comments on commit 4f9c481

Please sign in to comment.