-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: sensor: rtio: use catch-remaining for decoding
As new channels are added to the `enum sensor_channel`, some of the newer channel aren't updated in the whitelist of rtio decoder. Instead of specifying every channel in the list, do: 1. Verify that the `channel` is valid 2. cherry-pick the channels that require special handling, i.e. 1. `three_axis_data` 2. `byte_data` 3. `uint64_data` 3. handle the remaining `channel` in the default case as `q31_data` to make sure that all channels are handled. Updated the pytest to get channel 32, previously nothing would happen for this channel as there isn't a decoder for it, now it would return: ``` channel type=32((null)) ``` the channel name is NULL because it wasn't added to the channel name look up table in the sensor_shell.c, that is being fixed in #72815. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
- Loading branch information
Showing
1 changed file
with
12 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters