Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/coding-convention-tool
Submodule coding-convention-tool deleted from bd0d67
102 changes: 26 additions & 76 deletions .github/workflows/00-Check-Code-Convention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,88 +8,38 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to test'
description: "Branch to test"
type: string
default: 'master'
default: "main"

jobs:
job1:
name: Check coding convention
runs-on: ubuntu-22.04 #uncrustify 0.64 can not be compiled on ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- name: Trigger
run: echo "Triggered by ${{github.event_name}} event"
- name: Check Branch Input
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ -z "${{ github.event.inputs.branch }}" ]; then
echo "Branch input is required for manual trigger."
exit 1
fi
- name: Trigger
run: echo "Triggered by ${{github.event_name}} event"
- name: Check Branch Input
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ -z "${{ github.event.inputs.branch }}" ]; then
echo "Branch input is required for manual trigger."
exit 1
fi
- name: Checkout
uses: actions/checkout@v4.1.7
with:
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}"
submodules: true
fetch-depth: 0
- name: Log Current Branch and Commit
run: |
fi
- name: Checkout
uses: actions/checkout@v4.1.7
with:
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}"
submodules: true

@AndrasZiegler Ziegler András (AndrasZiegler) Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this lines coding check is focused on the current repo not the submodules. Template also got it wrong.

fetch-depth: 0
- name: Log Current Branch and Commit
run: |
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Current commit: $(git rev-parse HEAD)"
- name: Install commit check tools
run: |
echo "Installing pre-commit ..."
python3 -m pip install pre-commit
echo "Installing uncrustify 0.64 from source code ..."
sudo apt-get install --no-install-recommends -y\
binutils ca-certificates git cmake make \
gcc g++ binutils libc6-dev
echo "Cloning Uncrustify repository..."
git clone -b uncrustify-0.64 --single-branch https://github.com/uncrustify/uncrustify.git
echo "Building and installing Uncrustify..."
mkdir ./uncrustify/build && cd ./uncrustify/build
cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=RelWithDebInfo ../
sudo make -j "$(nproc)"
sudo make install
echo "Uncrustify has been installed successfully!"
cd ../../
sudo cp ./.github/coding-convention-tool/tools/uncrustify/uncrustify.cfg ./uncrustify/uncrustify.cfg
echo "Install clang-tidy"
sudo apt-get install clang-tidy
- name: Apply custom formatting configuration
run: |
echo "Applying custom formatting configuration..."
chmod +x ./.github/coding-convention-tool/project_custom_config_handler.sh
./.github/coding-convention-tool/project_custom_config_handler.sh

- name: Run test
run: |
pre-commit install --config .github/coding-convention-tool/.pre-commit-config.yaml
pre-commit run --config .github/coding-convention-tool/.pre-commit-config.yaml --all-files 2>&1 | tee CodingConventionTool.txt
git diff > code-fix.patch || echo "No changes to patch."
ls -lah code-fix.patch

- name: Upload Result
uses: actions/upload-artifact@v4.3.4
with:
name: CodingConventionResult
path: CodingConventionTool.txt
retention-days: 90
- name: Upload Patch
uses: actions/upload-artifact@v4.3.4
with:
name: code-fix.patch
path: code-fix.patch
retention-days: 90
- name: Check log file to set status of the job
run: |
keywords=("Failed")
for keyword in "${keywords[@]}"; do
if grep -q "$keyword" CodingConventionTool.txt; then
echo "Keyword '$keyword' found in the file."
exit 1
else
echo "Keyword '$keyword' not found in the file."
fi
done
- name: Check Code Convention
uses: SiliconLabsSoftware/devs-coding-convention-tool@master
with:
exclude-regex: '.*\.(cs|txt)$'
codespell-ignore-words: ""
codespell-skip-paths: ""
12 changes: 7 additions & 5 deletions .github/workflows/01-cla-assistant.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: 01-CLA-Assistant
## This workflow is used for public repositories

on:
issue_comment:
types: [created]
Expand All @@ -15,7 +13,12 @@ permissions:

jobs:
CLAAssistant:
if: ${{ github.event.repository.visibility == 'public' }}
if: >-
github.event_name == 'pull_request_target' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
(github.event.comment.body == 'recheck' ||
contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA')))
runs-on: ubuntu-24.04
steps:
- name: Create CLA Assistant Lite bot token
Expand All @@ -28,15 +31,14 @@ jobs:
repositories: contributor-license-agreements

- name: "CLA Assistant"
if: ${{ contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' }}
uses: SiliconLabsSoftware/action-cla-assistant@silabs_flavour_v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
with:
path-to-signatures: "cla_signatures_db.json"
path-to-document: "https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md"
branch: 'cla-database'
branch: "cla-database"
allowlist: silabs-*,bot*
# the following are the optional inputs - If the optional inputs are not given, then default values will be taken
remote-organization-name: "SiliconLabsInternal"
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule ".github/coding-convention-tool"]
path = .github/coding-convention-tool
url = https://github.com/SiliconLabsSoftware/devs-coding-convention-tool.git
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void sl_bt_on_event(sl_bt_msg_t *evt)
system_id);
app_assert_status(sc);


app_log_info("System Boot\r\n");

sc = sl_bt_scanner_set_parameters(sl_bt_scanner_scan_mode_passive, 200, 200);
Expand Down Expand Up @@ -122,53 +121,52 @@ void sl_bt_on_event(sl_bt_msg_t *evt)
break;

case sl_bt_evt_system_external_signal_id:
if(evt->data.evt_system_external_signal.extsignals == SIGNAL_SCAN_TIMEOUT)
{
sl_bt_scanner_stop();
app_log_info("no connectable devices in range\r\n");
}
if (evt->data.evt_system_external_signal.extsignals == SIGNAL_SCAN_TIMEOUT) {
sl_bt_scanner_stop();
app_log_info("no connectable devices in range\r\n");
}
break;

case sl_bt_evt_scanner_extended_advertisement_report_id:
// there is no filter here because the LE Coded PHY device is rare
// add the filter if it is needed
remote_address = &(evt->data.evt_scanner_extended_advertisement_report.address);
app_log_info("advertisement/scan response from %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\r\n",
remote_address->addr[5],
remote_address->addr[4],
remote_address->addr[3],
remote_address->addr[2],
remote_address->addr[1],
remote_address->addr[0]);

app_log_info("RSSI %d\r\n", evt->data.evt_scanner_extended_advertisement_report.rssi);

app_log_info("data len: %d\r\n", evt->data.evt_scanner_extended_advertisement_report.data.len);

app_log_info("data raw: \r\n");
for(int i = 0; i< evt->data.evt_scanner_extended_advertisement_report.data.len; i++){
app_log("%c ", evt->data.evt_scanner_extended_advertisement_report.data.data[i]);
}
app_log("\r\n");
app_log_info("data hex: \r\n");
for(int i = 0; i< evt->data.evt_scanner_extended_advertisement_report.data.len; i++){
app_log("%x ", evt->data.evt_scanner_extended_advertisement_report.data.data[i]);
}
app_log("\r\n");

//stop the tracking timer
sl_sleeptimer_stop_timer(&sleep_timer_handle);

sl_bt_scanner_stop();
sc = sl_bt_connection_open(*remote_address,
sl_bt_gap_public_address,
sl_bt_gap_phy_coded,
&app_connection);
app_assert_status(sc);
remote_address = &(evt->data.evt_scanner_extended_advertisement_report.address);
app_log_info("advertisement/scan response from %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\r\n",
remote_address->addr[5],
remote_address->addr[4],
remote_address->addr[3],
remote_address->addr[2],
remote_address->addr[1],
remote_address->addr[0]);

app_log_info("RSSI %d\r\n", evt->data.evt_scanner_extended_advertisement_report.rssi);

app_log_info("data len: %d\r\n", evt->data.evt_scanner_extended_advertisement_report.data.len);

app_log_info("data raw: \r\n");
for (int i = 0; i < evt->data.evt_scanner_extended_advertisement_report.data.len; i++) {
app_log("%c ", evt->data.evt_scanner_extended_advertisement_report.data.data[i]);
}
app_log("\r\n");
app_log_info("data hex: \r\n");
for (int i = 0; i < evt->data.evt_scanner_extended_advertisement_report.data.len; i++) {
app_log("%x ", evt->data.evt_scanner_extended_advertisement_report.data.data[i]);
}
app_log("\r\n");

//stop the tracking timer
sl_sleeptimer_stop_timer(&sleep_timer_handle);

sl_bt_scanner_stop();
sc = sl_bt_connection_open(*remote_address,
sl_bt_gap_public_address,
sl_bt_gap_phy_coded,
&app_connection);
app_assert_status(sc);
break;

case sl_bt_evt_connection_phy_status_id:
app_log_info("using PHY %d\r\n", evt->data.evt_connection_phy_status.phy );
app_log_info("using PHY %d\r\n", evt->data.evt_connection_phy_status.phy);
break;

///////////////////////////////////////////////////////////////////////////
Expand All @@ -190,10 +188,10 @@ void sl_bt_on_event(sl_bt_msg_t *evt)
* @param[in] handle Handle of the sleeptimer instance
* @param[in] data Callback data
******************************************************************************/
void sleeptimer_callback(sl_sleeptimer_timer_handle_t *handle, void *data){
void sleeptimer_callback(sl_sleeptimer_timer_handle_t *handle, void *data)
{
(void)handle;
(void)data;

sl_bt_external_signal(SIGNAL_SCAN_TIMEOUT);

}
44 changes: 0 additions & 44 deletions advertising/bluetooth_low_power_beacon/README.md

This file was deleted.

Binary file not shown.
Loading