Skip to content

system/uorb: Added new sensor types - #3780

Open
Otpvondoiats wants to merge 3 commits into
apache:masterfrom
Otpvondoiats:lk-uorb
Open

system/uorb: Added new sensor types#3780
Otpvondoiats wants to merge 3 commits into
apache:masterfrom
Otpvondoiats:lk-uorb

Conversation

@Otpvondoiats

Copy link
Copy Markdown
Contributor

Summary

[RFC] uORB: add power-monitor support (voltage/current/power)#20094

depend on: apache/nuttx#20115

Added new sensor types and filled in the two previously missing data types.

Impact

Added a new data type; this does not affect module logic or require compilation changes.

Testing

Null

SENSOR_TYPE_VELOCITY and SENSOR_TYPE_AMBIENT_TEMPERATURE have an
entry in the kernel g_sensor_meta[] table but no ORB_DECLARE/ORB_DEFINE
in user space, so ORB_ID() fails to link, callers must fall back to
orb_open() by name and lose the o_size check, and uorb_listener cannot
monitor them.
Add the missing metadata and register both in g_sensor_list[];
ambient_temp reuses struct sensor_temp the same way sensor_light_uncal
already reuses struct sensor_light.

Signed-off-by: likun17 <likun17@xiaomi.com>
Declare and define the uORB metadata for the voltage, current and power
types, and register them in g_sensor_list[] so that orb_get_meta() and
uorb_listener can resolve them by name.

Signed-off-by: likun17 <likun17@xiaomi.com>
Declare and define the uORB metadata for the resistance, conductivity,
energy and charge types, and register them in g_sensor_list[] so that
orb_get_meta() and uorb_listener can resolve them by name.

Signed-off-by: likun17 <likun17@xiaomi.com>
@simbit18

Copy link
Copy Markdown
Contributor

Hi @Otpvondoiats, please improve the title of the PR

system/uorb: Added new sensor types

@Otpvondoiats Otpvondoiats changed the title Lk uorb system/uorb: Added new sensor types Sep 14, 2026
@Otpvondoiats

Copy link
Copy Markdown
Contributor Author

Hi @Otpvondoiats, please improve the title of the PR

system/uorb: Added new sensor types
Done,Just fixed a CI error and pushed the changes again.

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.

3 participants