Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Remove _blue/_green/_red scale prefix for color sensors #2351

Merged
merged 1 commit into from
Nov 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified src/lib/io/include/sol-iio.h
100755 → 100644
Empty file.
13 changes: 12 additions & 1 deletion src/lib/io/sol-iio.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,22 @@ channel_get_pure_name(const char *name)
channel_name[sizeof(channel_name) - 1] = '\0';

channel_name_len = strlen(channel_name);
if (strendswith(channel_name, "_both")) {
if (strendswith(channel_name, "_green")) {
channel_name[channel_name_len - 6] = '\0';
modified = true;
}

if (strendswith(channel_name, "_both") ||
strendswith(channel_name, "_blue")) {
channel_name[channel_name_len - 5] = '\0';
modified = true;
}

if (strendswith(channel_name, "_red")) {
channel_name[channel_name_len - 4] = '\0';
modified = true;
}

if (strendswith(channel_name, "_ir") ||
strendswith(channel_name, "_uv")) {
channel_name[channel_name_len - 3] = '\0';
Expand Down
Empty file modified src/modules/flow/iio/iio.json
100755 → 100644
Empty file.
Empty file modified src/modules/flow/iio/nodes.c
100755 → 100644
Empty file.