This is an automated email from the ASF dual-hosted git repository. linguini pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 41eaa50a5813d277089a32cfd4069bd06285eb03 Author: Matteo Golin <matteo.go...@gmail.com> AuthorDate: Wed Aug 6 23:15:58 2025 -0400 drivers/sensors/lis2mdl: Increase buffer size The ODR of this sensor is too high to have a buffer size of 1. Signed-off-by: Matteo Golin <matteo.go...@gmail.com> --- drivers/sensors/Kconfig | 7 +++++++ drivers/sensors/lis2mdl_uorb.c | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index f61fd548103..365f2a8a99a 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -1659,6 +1659,13 @@ config SENSORS_LIS2MDL_THREAD_STACKSIZE ---help--- The stack size for the worker thread that performs measurements +config SENSORS_LIS2MDL_ORB_BUFSIZE + int "LIS2MDL uORB buffer size" + default 10 + range 0 100 + ---help--- + The size of the uORB circular buffer for storing measurements. + config SENSORS_LIS2MDL_FETCH bool "Enable LIS2MDL fetch capability" default n diff --git a/drivers/sensors/lis2mdl_uorb.c b/drivers/sensors/lis2mdl_uorb.c index 7d22719c717..98c9407f36b 100644 --- a/drivers/sensors/lis2mdl_uorb.c +++ b/drivers/sensors/lis2mdl_uorb.c @@ -1307,6 +1307,7 @@ int lis2mdl_register(FAR struct i2c_master_s *i2c, int devno, uint8_t addr, priv->lower.ops = &g_sensor_ops; priv->lower.type = SENSOR_TYPE_MAGNETIC_FIELD; + priv->lower.nbuffer = CONFIG_SENSORS_LIS2MDL_ORB_BUFSIZE; priv->enabled = false; priv->lowpower = false; priv->offsets = false;