Skip to content

Conversation

Sokario
Copy link
Contributor

@Sokario Sokario commented Oct 16, 2025

Some sensors have one trigger type for different data.
To address this feature, the standard api sample_fetch/channel_get allows the user to specify channels with the trigger type.
However, the async API Read and Decode doesn't gives channels configuration oportunity.

Proposition:
This issue can be handled by adding enum sensor_channel chan in struct sensor_stream_trigger.
Adding it to the end of the structure doesn't break any macro or existing code.
It allows the user to configure different opt for different channels using the same trigger type.

@Sokario
Copy link
Contributor Author

Sokario commented Oct 20, 2025

@kartben The CI encountered an API rate limit error. I’m not sure if there’s anything I need to do. Is this an issue on Zephyr’s end or on my organization’s end?

@Sokario
Copy link
Contributor Author

Sokario commented Oct 20, 2025

Thanks @kartben for your quick action on this — much appreciated.

@alexapostolu
Copy link
Contributor

alexapostolu commented Oct 20, 2025

Should it be sensor_chan_spec instead of sensor_channel for more generality?

@Sokario
Copy link
Contributor Author

Sokario commented Oct 21, 2025

Oh, you’re right, @alexapostolu — I didn’t think about the channel indices. I’ll make the change.

Added `struct sensor_chan_spec chan_spec` in `struct sensor_stream_trigger`
in order to allow the user to configure different `opt` to different
channels using the same `trigger`.

Signed-off-by: Logan Saint-Germain <[email protected]>
@Sokario Sokario force-pushed the drivers/sensors/sensor_async branch from fec73ac to a4f510a Compare October 21, 2025 08:55
@sonarqubecloud
Copy link

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

Labels

area: Sensors Sensors size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants