Skip to content

Export location module and implement compass API - #725

Merged
KenVanHoeylandt merged 3 commits into
mainfrom
add-location-module-to-sdk
Oct 28, 2026
Merged

KenVanHoeylandt merged 3 commits into
mainfrom
add-location-module-to-sdk

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • The location module is now included in SDK releases, making its functionality available alongside other released SDK modules.
    • Added compass support for reading magnetic-field measurements in microteslas and heading in degrees. Headings can be provided by the compass device or calculated from its horizontal field readings, with valid results normalized to the 0–360° range.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The kernel adds a compass driver API for magnetic-field readings and headings. The heading helper uses a driver's heading callback when available. Otherwise, it derives a heading from the x and y field values. The change also registers the compass symbols, adds tests, and adds location-module to the release SDK module list.

Priority: Normal

Merge Risk: Moderate · up to 3f135

Location support is packaged but is not available through the standard SDK app setup. Connect it to the SDK integrations before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies both major changes: exporting the location module and implementing the compass API. It is concise and specific.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔇 Additional comments: 1
TactilityKernel/source/drivers/compass.cpp: 1

25-25: Trivial · Maintainability & Code Quality · Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Use a standard C++ constant for π.

M_PI is an extension and is not guaranteed by <cmath>. This project selects C++23, so <numbers> and std::numbers::pi_v<float> provide the constant without depending on a platform macro. This is a portability change; the supplied build configuration does not establish a current build failure. Based on learnings, “M_PI is a non-standard extension” and reviewers should flag its use in portable code. (gnu.org)

Source: Learnings


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e15e9f0-cb6e-4bc6-aebe-ea7276840d85
Commits

Reviewing files that changed from the base of the PR and between 72e9b4d and 9b8cffc.

Files selected for processing: 4
  • TactilityKernel/include/tactility/drivers/compass.h
  • TactilityKernel/source/drivers/compass.cpp
  • TactilityKernel/source/symbols.c
  • TactilityKernel/tests/source/compass_test.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread TactilityKernel/include/tactility/drivers/compass.h Outdated
Comment thread TactilityKernel/source/drivers/compass.cpp
Comment thread TactilityKernel/source/drivers/compass.cpp Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Connect location-module to the standard SDK integration. · release-sdk-modules.txt:8

Buildscripts/release-sdk-modules.txt:8
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Connect location-module to the standard SDK integration.

The release list copies the module, but ordinary SDK apps depend only on TactilitySDK. The ESP32 integration does not select or require location-module, and the POSIX integration does not expose its headers. Apps using the standard templates therefore cannot use the location API without manual CMake configuration.

Suggested fix
diff --git a/Buildscripts/TactilitySDK/CMakeLists.txt b/Buildscripts/TactilitySDK/CMakeLists.txt
@@
-    REQUIRES esp_timer app-module crypt-module gps-module lvgl-module lvgl-window-manager-module service-module
+    REQUIRES esp_timer app-module crypt-module gps-module location-module lvgl-module lvgl-window-manager-module service-module
diff --git a/Buildscripts/TactilitySDK/TactilitySDK.esp32.cmake b/Buildscripts/TactilitySDK/TactilitySDK.esp32.cmake
@@
         crypt-module
         gps-module
+        location-module
         lvgl-module
diff --git a/Buildscripts/TactilitySDK/TactilitySDK.posix.cmake b/Buildscripts/TactilitySDK/TactilitySDK.posix.cmake
@@
         ${TACTILITY_SDK_PATH}/Modules/gps-module/include
+        ${TACTILITY_SDK_PATH}/Modules/location-module/include
         ${TACTILITY_SDK_PATH}/Modules/lvgl-module/include

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a4713428-0d74-4d74-b313-bb778e501e40
Commits

Reviewing files that changed from the base of the PR and between 9b8cffc and 3f13582.

Files selected for processing: 3
  • TactilityKernel/include/tactility/drivers/compass.h
  • TactilityKernel/source/drivers/compass.cpp
  • TactilityKernel/tests/source/compass_test.cpp
Files skipped from review as they are similar to previous changes: 3
  • TactilityKernel/tests/source/compass_test.cpp
  • TactilityKernel/source/drivers/compass.cpp
  • TactilityKernel/include/tactility/drivers/compass.h

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@KenVanHoeylandt KenVanHoeylandt changed the title Export location module in TactilitySDK Export location module and implement compass API Oct 28, 2026
@KenVanHoeylandt
KenVanHoeylandt merged commit 0e276da into main Oct 28, 2026
5 of 25 checks passed
@KenVanHoeylandt
KenVanHoeylandt deleted the add-location-module-to-sdk branch October 28, 2026 22:38
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.

1 participant