Skip to content

chore: merge address and address type into a single GapAddress parameter in BLE middleware#741

Open
oguzcan oguz (oguzcanoguz) wants to merge 3 commits intomainfrom
feature/merge_address_and_addresstype_in_gap_classes
Open

chore: merge address and address type into a single GapAddress parameter in BLE middleware#741
oguzcan oguz (oguzcanoguz) wants to merge 3 commits intomainfrom
feature/merge_address_and_addresstype_in_gap_classes

Conversation

@oguzcanoguz
Copy link
Contributor

@oguzcanoguz oguzcan oguz (oguzcanoguz) commented Feb 23, 2026

merge address and address type into a single GapAddress parameter in BLE middleware

@oguzcanoguz oguzcan oguz (oguzcanoguz) requested a review from a team as a code owner February 23, 2026 15:05
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.31s
✅ CPP clang-format 15 2 0 0 1.07s
✅ CPP cppcheck 15 0 0 0.78s
✅ DOCKERFILE hadolint 1 0 0 0.32s
✅ JSON jsonlint 7 0 0 0.21s
✅ JSON prettier 7 2 0 0 1.46s
⚠️ MARKDOWN markdownlint 6 1 10 0 1.59s
✅ MARKDOWN markdown-table-formatter 6 1 0 0 1.09s
✅ REPOSITORY checkov yes no no 26.92s
✅ REPOSITORY git_diff yes no no 0.56s
✅ REPOSITORY grype yes no no 29.88s
✅ REPOSITORY ls-lint yes no no 0.06s
✅ REPOSITORY secretlint yes no no 44.32s
✅ REPOSITORY syft yes no no 1.39s
✅ REPOSITORY trivy yes no no 6.12s
✅ REPOSITORY trivy-sbom yes no no 1.14s
✅ REPOSITORY trufflehog yes no no 8.19s
⚠️ SPELL lychee 34 1 0 87.26s
✅ YAML prettier 10 1 0 0 1.36s
✅ YAML v8r 10 0 0 4.78s
✅ YAML yamllint 10 0 0 0.42s

Detailed Issues

⚠️ SPELL / lychee - 1 error
[IGNORED] tcp://localhost:1234/target/echo/programmer | Unsupported: Error creating request client: builder error for url (tcp://localhost:1234/target/echo/programmer)
[ERROR] http://mcd.rou.st.com/modules.php?name=mcu | Network error: error sending request for url (http://mcd.rou.st.com/modules.php?name=mcu) Maybe a certificate error?
[TIMEOUT] https://st.com/ | Timeout
📝 Summary
---------------------
🔍 Total..........239
✅ Successful.....236
⏳ Timeouts.........1
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1

Errors in README.md
[TIMEOUT] https://st.com/ | Timeout

Errors in .github/ISSUE_TEMPLATE/add-or-update-hal-driver.md
[ERROR] http://mcd.rou.st.com/modules.php?name=mcu | Network error: error sending request for url (http://mcd.rou.st.com/modules.php?name=mcu) Maybe a certificate error?
⚠️ MARKDOWN / markdownlint - 10 errors
.github/ISSUE_TEMPLATE/add-or-update-hal-driver.md:10 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "How to import a HAL driver"]
CHANGELOG.md:83 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:87 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:94 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:103 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:122 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:140 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:144 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:151 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:162 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.3.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

Comment on lines +39 to +48
if (identityAddressType == GAP_PUBLIC_ADDR)
{
aci_hal_read_config_data(CONFIG_DATA_PUBADDR_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::publicAddress;
}
else
{
aci_hal_read_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::randomAddress;
}
Copy link
Member

@danielschenk Daniël Schenk (danielschenk) Feb 26, 2026

Choose a reason for hiding this comment

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

I see there are two more types. I think this is safer

Suggested change
if (identityAddressType == GAP_PUBLIC_ADDR)
{
aci_hal_read_config_data(CONFIG_DATA_PUBADDR_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::publicAddress;
}
else
{
aci_hal_read_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::randomAddress;
}
switch (identityAddressType)
{
case GAP_PUBLIC_ADDR:
aci_hal_read_config_data(CONFIG_DATA_PUBADDR_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::publicAddress;
break;
case GAP_STATIC_RANDOM_ADDR:
aci_hal_read_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, &length, address.address.data());
address.type = services::GapDeviceAddressType::randomAddress;
break;
default:
LOG_AND_ABORT("unknown address type: %u", identityAddressType);
}

Copy link
Contributor

@heinwessels-philips heinwessels (heinwessels-philips) Feb 26, 2026

Choose a reason for hiding this comment

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

The intended way to log the unexpected enum is: LOG_AND_ABORT_ENUM(identityAddressType);

Choose a reason for hiding this comment

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

It's not an enum, but I edited it to print the value regardless

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.

3 participants