Skip to content

Add option to blend STHS debug data into acceleration for quick valid…#273

Open
ojousima wants to merge 14 commits intomasterfrom
add-sths34pf80-debug
Open

Add option to blend STHS debug data into acceleration for quick valid…#273
ojousima wants to merge 14 commits intomasterfrom
add-sths34pf80-debug

Conversation

@ojousima
Copy link
Member

@ojousima ojousima commented Feb 5, 2026

Closes #274

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a debug mode feature to the STHS34PF80 thermal infrared sensor driver that allows debug data to be reported through acceleration fields for easier validation and visualization. When enabled via the SHTS_DEBUG_DATA_IN_ACCELERATION flag, raw algorithm values are exposed as pseudo-acceleration data alongside the standard sensor readings.

Changes:

  • Adds debug mode that exposes internal algorithm values (tpresence, tmotion, tobject) as acceleration fields for plotting/debugging
  • Introduces temperature shock detection and automatic algorithm reset functionality
  • Adds ri_sths34pf80_configure_defaults() function with ST reference configuration values for thresholds and averaging
  • Extends sensor data structure with new debug_tamb field for ambient shock monitoring

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/ruuvi_driver_sensor.h Adds debug_tamb field to sensor data bitfield and corresponding macro
src/interfaces/environmental/ruuvi_interface_sths34pf80.h Adds default configuration constants and configure_defaults() function declaration
src/interfaces/environmental/ruuvi_interface_sths34pf80.c Implements debug data blending, temperature shock handling, and default configuration function
test/interfaces/environmental/test_ruuvi_interface_sths34pf80.c Adds test helpers and new test for data index validation
src/integration_tests/ruuvi_driver_sensor_test.c Updates maximum field count and adds field name for printing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ojousima and others added 11 commits February 17, 2026 12:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ojousima ojousima requested a review from TheSomeMan February 28, 2026 18:26
@ojousima ojousima self-assigned this Feb 28, 2026
@ojousima ojousima added the enhancement New feature or request label Feb 28, 2026
@sonarqubecloud
Copy link

@ojousima
Copy link
Member Author

Verified with ruuvi.firmware.c/feature/sths34pf80-support, tags can be configured to send sths34pf80 algorithm state in acceleration data for testing and development.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose sths34pf80 algorithm state for application for debugging

2 participants