Commit Graph

2 Commits

Author SHA1 Message Date
Gerard Marull-Paretas
55da0217da sys: linear_range: fix index calculation when spanning across groups
When dealing with groups, the specified window in
linear_range_group_get_win_index can span across multiple groups. In the
current implementation, if maximum value was not in the same sub-window
as the minimum value the function would return -EINVAL. This patch fixes
the problem and updates test cases to cover such scenario.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-02 11:29:35 +01:00
Gerard Marull-Paretas
9f509f5b11 tests: lib: linear_range: add coverage
Add coverage for the linear_range API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-24 10:16:03 +01:00