Skip to content

Added nau7802 odr as kconfig option#8

Closed
bskdany wants to merge 1 commit into
masterfrom
nau7802_odr_kconfig
Closed

Added nau7802 odr as kconfig option#8
bskdany wants to merge 1 commit into
masterfrom
nau7802_odr_kconfig

Conversation

@bskdany

@bskdany bskdany commented Jul 5, 2025

Copy link
Copy Markdown

Summary

The Kconfig option for the ODR was added for on the fly configuration of the system

Impact

You can now change the ODR on the nau7802

Testing

Comment thread drivers/sensors/Kconfig

config SENSORS_NAU7802_ODR
int "NAU7802 ODR"
default 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add a range keyword to help limit to 0-7

Comment thread drivers/sensors/nau7802.c
priv->lower.type = SENSOR_TYPE_FORCE;
priv->enabled = false;
priv->odr = NAU7802_ODR_10HZ; /* 10Hz (0.1s) default ODR */
priv->odr = CONFIG_SENSORS_NAU7802_ODR;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the sensor boots, is it's default 10Hz? Because if so, you'll need to make sure that a user ODR of a different value is set on the chip, not just stored in the struct.

Also, make this configurable via the uORB interface for setting sampling frequency.

@bskdany bskdany closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants